protected void DoIfCanMoveOn(Operation operation)
        {
            string message;

            if (_wizardController.CanMoveOn(out message))
            {
                operation();
            }
            else
            {
                FireMessagePosted(message);
            }
        }
        public void Test_Next_ShouldCallWizardControllerNext()
        {
            //---------------Set up test pack-------------------
            IWizardController controller    = MockRepository.GenerateMock <IWizardController>();
            IWizardControl    wizardControl = GetControlFactory().CreateWizardControl(controller);
            string            message;

            controller.Stub(wizardController => wizardController.CanMoveOn(out message)).Return(true);
            controller.Stub(controller1 => controller1.GetNextStep()).Return(CreateWizardStepStub());
            //---------------Assert Precondition----------------
            Assert.IsTrue(controller.CanMoveOn(out message));
            controller.AssertWasNotCalled(cntrler => cntrler.CompleteCurrentStep());
            //---------------Execute Test ----------------------
            wizardControl.Next();
            //---------------Test Result -----------------------
            controller.AssertWasCalled(cntrler => cntrler.CompleteCurrentStep());
        }