public void can_replace_arg() { var args = new Args(); args.AddOrReplace("arg1", "A"); args.AddOrReplace("arg1", "B"); Assert.AreEqual("B", args["arg1"]); }
public void can_add_colection_of_args_to_a_step_in_constructor() { var args = new Args(); args.AddOrReplace("arg1", "A"); args.AddOrReplace("arg2", "B"); var step = new WizardStep(args); Assert.AreEqual(args, step.Args); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); var argsForStep2 = new Args(); argsForStep2.AddOrReplace("arg1", "abcdef"); argsForStep2.AddOrReplace("arg2", "bcdef"); argsForStep2.AddOrReplace("arg3", "cdef"); argsForStep2.AddOrReplace("arg4", "efghi"); argsForStep2.AddOrReplace("arg5", "fghijkl"); IWizardView view = new SimpleWizardView(); var controller = new WizardController(view); var wizard = new Wizard(); wizard.AddStep(new Step1(argsForStep2)) .AddStep(new Step2(argsForStep2)); controller.Start(wizard); Application.Run(view as Form); }