main
 1using System;
 2using developwithpassion.bdd.contexts;
 3using Gorilla.Commons.Testing;
 4using momoney.presentation.presenters;
 5using MoMoney.Presentation.Views;
 6using MoMoney.Presentation.Winforms.Helpers;
 7
 8namespace MoMoney.Presentation.Winforms.Views
 9{
10    public class behaves_like_application_shell : concerns_for<IShell, ApplicationShell>
11    {
12    }
13
14    public class when_the_application_shell_is_closed : behaves_like_application_shell
15    {
16        it should_execute_the_close_command = () => presenter.was_told_to(x => x.shut_down());
17
18        context c = () => { presenter = an<IApplicationShellPresenter>(); };
19
20        after_the_sut_has_been_created a = () => { sut.attach_to(presenter); };
21
22        because b = () => EventTrigger.trigger_event<Events.FormEvents>(x => x.OnClosed(new EventArgs()), sut);
23
24        static IApplicationShellPresenter presenter;
25    }
26}