blob: 5ec7002e57004b084cefe1dee0944ed64e1cdc28 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
using MbUnit.Framework;
using Notepad.Presentation.Core;
using Rhino.Mocks;
namespace Notepad.Presentation.Presenters.Commands {
public class RunPresenterCommandSpecs {}
[TestFixture]
public class when_executing_the_run_presenter_command_ {
private MockRepository mockery;
private IApplicationController applicationController;
[SetUp]
public void SetUp() {
mockery = new MockRepository();
applicationController = mockery.DynamicMock<IApplicationController>();
}
[Test]
public void should_run_the_display_about_presenter() {
using (mockery.Record()) {
applicationController.Run<IPresenter>();
}
using (mockery.Playback()) {
CreateSUT().Execute();
}
}
private IRunPresenterCommand<IPresenter> CreateSUT() {
return new RunPresenterCommand<IPresenter>(applicationController);
}
}
}
|