static void Main(string[] args) { ElderSon Eson = new ElderSon(); Dad dad = new Dad(Eson); Console.WriteLine(dad.NotifySon("Get me the knife")); YoungerSon Yson = new YoungerSon(); Dad dad2 = new Dad(Yson); Console.WriteLine(dad2.NotifySon("Get me the fork").ToString()); Mom mom = new Mom(); Console.WriteLine(mom.NotifySon(Yson, "Help Me")); Console.WriteLine(mom.NotifySon(Eson, "Help Me")); StepFather StFather = new StepFather(); StFather.FirstSon = Yson; StFather.SecondSon = Eson; Console.WriteLine(StFather.NotifySon("Get the hell out of the house")); StepMother StMother = new StepMother(); StMother.FirstSon = Yson; Console.WriteLine(StMother.NotifySon("First son get out, second son may stay")); Console.ReadKey(); }
internal static void Main(string[] args) { var commandLineArguments = new CommandLineArguments(args); var stepMother = new StepMother<ConcreteWorldView>(StepSetLoader.GetStepSets()); var processor = new Processor(stepMother, stepMother.StepRunner); // Reset the WorldView before each scenario processor.BeforeScenario += (o, e) => stepMother.ResetWorldView(); processor.BeforeScenario += BeforeScenario; processor.AfterScenario += AfterScenario; processor.BeforeStep += BeforeStep; processor.AfterStep += AfterStep; processor.AtExit += AtExit; new StepServer(IPAddress.Any, commandLineArguments, processor).InitBlock(); }
public void SetUp() { stepMother = new StepMother<EmptyWorldView>(); transformDefinition1 = new TransformDefinition { Regex = new Regex("1"), Action = new Func<int>(() => 1) }; transformDefinition2 = new TransformDefinition { Regex = new Regex("2"), Action = new Func<int>(() => 2) }; }