main
 1using developwithpassion.bdd.contexts;
 2using Gorilla.Commons.Testing;
 3using MoMoney.Presentation.Presenters;
 4using MoMoney.Service.Infrastructure.Eventing;
 5
 6namespace MoMoney.Modules
 7{
 8    public class GettingStartedModuleSpecs
 9    {
10        public class behaves_like_the_getting_started_module :
11            concerns_for<IGettingStartedModule, GettingStartedModule>
12        {
13            context c = () =>
14                            {
15                                broker = the_dependency<IEventAggregator>();
16                                command = the_dependency<IRunPresenterCommand>();
17                            };
18
19            static protected IEventAggregator broker;
20            static protected IRunPresenterCommand command;
21        }
22
23        public class when_initializing_the_getting_started_module : behaves_like_the_getting_started_module
24        {
25            it should_start_listening_for_when_a_new_project_is_started =
26                () => broker.was_told_to(x => x.subscribe((GettingStartedModule) sut));
27
28            because b = () => sut.run();
29        }
30    }
31}