summaryrefslogtreecommitdiff
path: root/product/Presentation/Presenters/RunTheSpecs.cs
blob: 9a4fb42f81b78a041b3c79dee9bd788600f1422c (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
using developwithpassion.bdd.contexts;
using Gorilla.Commons.Testing;
using MbUnit.Framework;
using MoMoney.Presentation.Core;
using MoMoney.Service.Infrastructure.Threading;

namespace momoney.presentation.presenters
{
    public class RunTheSpecs
    {
        [Ignore]
        [Concern(typeof (RunThe<>))]
        public class when_initializing_different_regions_of_the_user_interface :
            concerns_for<IRunThe<IPresenter>, RunThe<IPresenter>>
        {
            //it should_initialize_the_presenter_that_controls_that_region = () => controller.was_told_to(x => x.run<IPresenter>());
            it should_initialize_the_presenter_that_controls_that_region = () => processor.was_told_to(x => x.add(() => controller.run<IPresenter>()));

            context c = () =>
            {
                controller = the_dependency<IApplicationController>();
                processor = the_dependency<CommandProcessor>();
            };

            because b = () => sut.run();

            static IApplicationController controller;
            static CommandProcessor processor;
        }
    }
}