public void Test_Previous_ShouldCallUndoMoveOnForPreviousStep()
{
//---------------Set up test pack-------------------
WizardController controller = new WizardController();
IWizardControl wizardControl = GetControlFactory().CreateWizardControl(controller);
var step1 = CreateWizardStepStub();
controller.AddStep(step1);
var step2 = CreateWizardStepStub();
controller.AddStep(step2);
step1.AllowMoveOn = true;
step2.AllowMoveBack = true;
controller.GetFirstStep();
controller.GetNextStep();
//---------------Assert Precondition----------------
Assert.IsTrue(controller.CanMoveBack());
Assert.AreSame(step2, controller.GetCurrentStep());
Assert.IsFalse(step1.UndoMoveOnWasCalled);
Assert.IsFalse(step2.UndoMoveOnWasCalled);
//---------------Execute Test ----------------------
wizardControl.Previous();
//---------------Test Result -----------------------
Assert.AreSame(step1, controller.GetCurrentStep());
Assert.IsTrue(step1.UndoMoveOnWasCalled);
Assert.IsFalse(step2.UndoMoveOnWasCalled);
}