public void Test_UndoCurrentStep_ShouldCallStepMoveBack() { //---------------Set up test pack------------------- WizardController wizardController = new WizardController(); var step1 = MockRepository.GenerateMock<IWizardStep>(); wizardController.AddStep(step1); wizardController.GetFirstStep(); //---------------Assert Precondition---------------- Assert.AreEqual(1, wizardController.StepCount); step1.AssertWasNotCalled(step => step.UndoMoveOn()); Assert.AreSame(step1, wizardController.GetCurrentStep()); //---------------Execute Test ---------------------- wizardController.UndoCompleteCurrentStep(); //---------------Test Result ----------------------- step1.AssertWasCalled(wizardStep => wizardStep.UndoMoveOn()); }