diff options
| author | mo <mo.khan@gmail.com> | 2018-11-04 15:22:16 -0700 |
|---|---|---|
| committer | mo <mo.khan@gmail.com> | 2018-11-04 15:22:16 -0700 |
| commit | 5ee1f55497a4e30322a56f133f897ecde1612967 (patch) | |
| tree | bf544e0879234c3623869627d8786776cb19b8e9 /src/Notepad/Presentation/Presenters/Shell/MainShellPresenterSpecs.cs | |
Diffstat (limited to 'src/Notepad/Presentation/Presenters/Shell/MainShellPresenterSpecs.cs')
| -rw-r--r-- | src/Notepad/Presentation/Presenters/Shell/MainShellPresenterSpecs.cs | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/Notepad/Presentation/Presenters/Shell/MainShellPresenterSpecs.cs b/src/Notepad/Presentation/Presenters/Shell/MainShellPresenterSpecs.cs new file mode 100644 index 0000000..681ce58 --- /dev/null +++ b/src/Notepad/Presentation/Presenters/Shell/MainShellPresenterSpecs.cs @@ -0,0 +1,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);
+ }
+ }
+}
\ No newline at end of file |
