public void Wizard_BubbleEvent_MoveComplete () { PokerWizard wizard = new PokerWizard (); wizard.FinishButtonClick += new WizardNavigationEventHandler (wizard_handler); WizardStep step1 = new WizardStep (); step1.ID = "step1"; step1.StepType = WizardStepType.Start; WizardStep step2 = new WizardStep (); step2.ID = "step2"; step2.StepType = WizardStepType.Finish; WizardStep step3 = new WizardStep (); step3.ID = "step2"; step3.StepType = WizardStepType.Complete; wizard.WizardSteps.Add (step1); wizard.WizardSteps.Add (step2); wizard.WizardSteps.Add (step3); wizard.ActiveStepIndex = 1; CommandEventArgs e = new CommandEventArgs (Wizard.MoveCompleteCommandName, null); bool result = wizard.DoBubbleEvent (null, e); Assert.AreEqual (true, result, "MoveCompleteEventCommand"); eventassert ("MoveCompleteBubbleEvent"); }
public void Wizard_BubbleEvent_MoveTo () { PokerWizard wizard = new PokerWizard (); WizardStep step1 = new WizardStep (); step1.ID = "step1"; step1.StepType = WizardStepType.Start; WizardStep step2 = new WizardStep (); step2.ID = "step2"; step2.StepType = WizardStepType.Finish; wizard.WizardSteps.Add (step1); wizard.WizardSteps.Add (step2); wizard.ActiveStepIndex = 0; CommandEventArgs e = new CommandEventArgs (Wizard.MoveToCommandName, "1"); bool result = wizard.DoBubbleEvent (null, e); Assert.AreEqual (true, result, "MoveToEventCommand"); Assert.AreEqual (1, wizard.ActiveStepIndex, "ActiveStepIndexAfterMoveToBubble"); }
public void Wizard_BubbleEvent_CancelEvent () { PokerWizard wizard = new PokerWizard (); wizard.CancelButtonClick += new EventHandler (wizard_handler); WizardStep step1 = new WizardStep (); step1.ID = "step1"; step1.StepType = WizardStepType.Start; WizardStep step3 = new WizardStep (); step3.ID = "step3"; step3.StepType = WizardStepType.Finish; wizard.WizardSteps.Add (step1); wizard.WizardSteps.Add (step3); wizard.ActiveStepIndex = 0; CommandEventArgs e = new CommandEventArgs (Wizard.CancelCommandName, null); bool result = wizard.DoBubbleEvent (null, e); Assert.AreEqual (true, result, "CancelButtonBubbleEventCommand"); eventassert ("OnCancelButtonClick"); }