blob: 681ce5844b7312567936e40db5979417b9c1060d (
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
35
36
|
using MbUnit.Framework;
using Notepad.Presentation.Core;
using Notepad.Presentation.Presenters.Menu;
using Notepad.Presentation.Presenters.Shell;
using Rhino.Mocks;
namespace Notepad.Presentation.Presenters.Shell {
public class MainShellPresenterSpecs {}
[TestFixture]
public class when_initializing_the_main_shell_presenter_ {
private MockRepository mockery;
private IApplicationController applicationController;
[SetUp]
public void SetUp() {
mockery = new MockRepository();
applicationController = mockery.DynamicMock<IApplicationController>();
}
[Test]
public void should_initialize_the_main_menu_presenter() {
using (mockery.Record()) {
applicationController.Run<IMainMenuPresenter>();
}
using (mockery.Playback()) {
CreateSUT().Initialize();
}
}
private IMainShellPresenter CreateSUT() {
return new MainShellPresenter(applicationController);
}
}
}
|