public void Fail_when_calls_made_in_different_order()
 {
     Assert.Throws <CallSequenceNotFound>(() =>
                                          Received.This(() => _ignition.TurnRight())
                                          .Then(() => _engine.Stop())
                                          .Then(() => _engine.Start())
                                          );
 }
 public void Pass_when_checking_sequence_with_multiple_substitutes()
 {
     Received.This(() => _ignition.TurnRight())
     .Then(() => _engine.Start())
     .Then(() => _engine.Rev())
     .Then(() => _ignition.TurnLeft())
     .Then(() => _engine.Stop());
 }
 public void Fail_when_one_of_the_calls_in_the_sequence_was_not_received()
 {
     Assert.Throws <CallSequenceNotFound>(() =>
                                          Received.This(() => _ignition.TurnRight())
                                          .Then(() => _engine.Start())
                                          .Then(() => _engine.Rev())
                                          .Then(() => _engine.Idle())
                                          .Then(() => _ignition.TurnLeft())
                                          .Then(() => _engine.Stop())
                                          );
 }
 public void Pass_when_checking_a_subset_of_the_sequence_with_one_substitute()
 {
     Received.This(() => _engine.Start())
     .Then(() => _engine.Rev())
     .Then(() => _engine.Stop());
 }
 public void Pass_when_checking_a_single_call_that_was_in_the_sequence()
 {
     _engine.Start();
     Received.This(() => _engine.Start());
 }