main
1using developwithpassion.bdd.contexts;
2using Gorilla.Commons.Testing;
3using gorilla.commons.utility;
4using MoMoney.Presentation;
5using MoMoney.Service.Infrastructure.Threading;
6
7namespace MoMoney.Modules.Core
8{
9 [Concern(typeof (LoadPresentationModulesCommand))]
10 public class when_loading_the_application_shell :
11 concerns_for<ILoadPresentationModulesCommand, LoadPresentationModulesCommand>
12 {
13 it should_initialize_all_the_presentation_modules = () => processor.was_told_to(x => x.add(module));
14
15 context c = () =>
16 {
17 registry = the_dependency<Registry<IModule>>();
18 processor = the_dependency<CommandProcessor>();
19 module = an<IModule>();
20 when_the(registry).is_told_to(r => r.all()).it_will_return(module);
21 };
22
23 because b = () => sut.run();
24
25 static Registry<IModule> registry;
26 static IModule module;
27 static CommandProcessor processor;
28 }
29}