Habanero.Faces.Base.WizardController.CanMoveBack C# (CSharp) Method

CanMoveBack() public method

Checks if the Wizard Can proceed to the next step. Calls through to the IWizardStep.CanMoveBack
public CanMoveBack ( ) : bool
return bool
        public bool CanMoveBack()
        {
            CheckWizardStep();
            return this.GetCurrentStep().CanMoveBack();
        }
        /// <summary>

Usage Example

 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);
 }
All Usage Examples Of Habanero.Faces.Base.WizardController::CanMoveBack