main
 1using developwithpassion.bdd.contexts;
 2using developwithpassion.bdd.mbunit;
 3using developwithpassion.bdd.mbunit.standard.observations;
 4using mars.rover.common;
 5using mars.rover.presentation.infrastructure;
 6
 7namespace specifications.presentation.infrastructure
 8{
 9    public class CommandFactorySpecs
10    {
11    }
12
13    public class when_creating_a_command_for_an_action : observations_for_a_sut_without_a_contract<CommandFactory>
14    {
15        it should_return_a_command_that_executes_the_action_when_invoked = () => was_executed.should_be_equal_to(true);
16
17        context c = () => { was_executed = false; };
18
19        because b = () =>
20                        {
21                            result = sut.create_for(() => was_executed = true);
22                            result.run();
23                        };
24
25        static Command result;
26        static bool was_executed;
27    }
28}