public void NavigateBunny(BugsBunny arg) { Spec <BugsBunny> .When(bunny => bunny.City.Equals("Albequerque")) .Then(bunny => { bunny.Turn("Left"); Debug.WriteLine("I'm not making that mistake again!"); }) .OrWhen(bunny => bunny.City.Equals("Phoenix")) .Then(bunny => bunny.Turn("Right")) .Run(arg); }
public void NavigateBunny(BugsBunny arg) { Spec<BugsBunny> .When(bunny => bunny.City.Equals("Albequerque")) .Then(bunny => { bunny.Turn("Left"); Debug.WriteLine("I'm not making that mistake again!"); }) .OrWhen(bunny => bunny.City.Equals("Phoenix")) .Then(bunny => bunny.Turn("Right")) .Run(arg); }