Example #1
0
        public void Test()
        {
            ProblemContext             problemContext = new ProblemContext();
            IWorkflow <ProblemContext> workflow       = new Workflow <ProblemContext>()
                                                        .Do(EnterFirstNameAction)
                                                        .Do(EnterLastNameAction);

            workflow.Start(problemContext);

            Assert.That(problemContext.Model.FirstName, Is.EqualTo("Joe"));
            Assert.That(problemContext.Model.LastName, Is.EqualTo("Smith"));
        }
Example #2
0
        private static void EnterLastNameAction(ProblemContext obj)
        {
            string name = obj.GetUserInput("lastName");

            obj.Model.LastName = name;
        }