public void When_steps_given_controller_builds()
        {
            var sut = FiveStepWizardController;

            sut.Current.Should().Be(WizardStep.Create("Step 1"));
            sut.AmountOfSteps.Should().Be(5);
            sut.CurrentStepNumber.Should().Be(1);
        }
        public void Step_previous_navigation_cycles_and_returns_last_step_continuously()
        {
            var sut = FiveStepWizardController;

            sut.HasNextStep.Should().BeTrue();
            sut.CurrentStepNumber.Should().Be(1);
            sut.Next().Should().Be(WizardStep.Create("Step 2"));
            sut.CurrentStepNumber.Should().Be(2);
            sut.Previous().Should().Be(WizardStep.Create("Step 1"));
            sut.CurrentStepNumber.Should().Be(1);
            sut.Previous().Should().Be(WizardStep.Create("Step 1"));
            sut.CurrentStepNumber.Should().Be(1);
            sut.HasPreviousStep.Should().BeFalse();
        }
Esempio n. 3
0
 static Main()
 {
     _wizard = new WizardController <WizardStep <Panel> >(new List <WizardStep <Panel> >
     {
         WizardStep <Panel> .Create(
             "Select a solution",
             GetWizardPanel(1)),
         WizardStep <Panel> .Create(
             "Select a new name for the solution",
             GetWizardPanel(2)),
         WizardStep <Panel> .Create(
             "Select an output directory",
             GetWizardPanel(3)),
         WizardStep <Panel> .Create(
             "Review steps",
             GetWizardPanel(4)),
         WizardStep <Panel> .Create(
             "Execute",
             GetWizardPanel(5))
     });
     SetWizardPanelDescriptions(_wizard);
 }
        public void Can_get_a_specific_step()
        {
            var sut = FiveStepWizardController;

            sut.GetStepAt(3).Should().Be(WizardStep.Create("Step 3"));
        }
Esempio n. 5
0
 private WizardStep(string description, TData data)
 {
     _wizardStep = WizardStep.Create(description);
     Data        = data;
 }