main
1using System.Collections.Generic;
2using developwithpassion.bdd;
3using developwithpassion.bdd.contexts;
4using developwithpassion.bdd.mbunit.standard.observations;
5using mars.rover;
6using mars.rover.common;
7using mars.rover.presentation;
8using mars.rover.presentation.model;
9
10namespace specifications
11{
12 public class ProgramSpecs
13 {
14 }
15
16 public abstract class behaves_like_a_program :
17 observations_for_a_sut_with_a_contract<ParameterizedCommand<IEnumerable<CommandLineArgument>>, Program>
18 {
19 context c = () => { presenter = the_dependency<Presenter>(); };
20
21 static protected Presenter presenter;
22 }
23
24 public class when_the_program_begins : behaves_like_a_program
25 {
26 it should_wait_for_instructions_from_nasa = () => presenter.received(x => x.run());
27
28 because b = () => sut.run_against(args);
29
30 static readonly IEnumerable<CommandLineArgument> args = new List<CommandLineArgument> {""};
31 }
32}