master
1using MbUnit.Framework;
2using Notepad.Presentation.Core;
3using Notepad.Presentation.Presenters.Menu;
4using Notepad.Presentation.Presenters.Shell;
5using Rhino.Mocks;
6
7namespace Notepad.Presentation.Presenters.Shell {
8 public class MainShellPresenterSpecs {}
9
10 [TestFixture]
11 public class when_initializing_the_main_shell_presenter_ {
12 private MockRepository mockery;
13 private IApplicationController applicationController;
14
15 [SetUp]
16 public void SetUp() {
17 mockery = new MockRepository();
18 applicationController = mockery.DynamicMock<IApplicationController>();
19 }
20
21 [Test]
22 public void should_initialize_the_main_menu_presenter() {
23 using (mockery.Record()) {
24 applicationController.Run<IMainMenuPresenter>();
25 }
26
27 using (mockery.Playback()) {
28 CreateSUT().Initialize();
29 }
30 }
31
32 private IMainShellPresenter CreateSUT() {
33 return new MainShellPresenter(applicationController);
34 }
35 }
36}