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