summaryrefslogtreecommitdiff
path: root/src/Notepad/Presentation/Presenters/Menu/Help/AboutApplicationPresenterSpecs.cs
blob: 26d7148d4368cb2dab48971df056cff50ee9df62 (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.Views.Menu.Help;
using Rhino.Mocks;

namespace Notepad.Presentation.Presenters.Menu.Help {
    public class AboutApplicationPresenterSpecs {}

    [TestFixture]
    public class when_initializing_the_application_information_presenter_ {
        private MockRepository mockery;
        private IAboutApplicationView view;

        [SetUp]
        public void SetUp() {
            mockery = new MockRepository();
            view = mockery.DynamicMock<IAboutApplicationView>();
        }

        [Test]
        public void should_display_the_view() {
            using (mockery.Record()) {
                view.Display();
            }

            using (mockery.Playback()) {
                CreateSUT().Initialize();
            }
        }

        private IAboutApplicationPresenter CreateSUT() {
            return new AboutApplicationPresenter(view);
        }
    }
}