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")); }
private static void EnterLastNameAction(ProblemContext obj) { string name = obj.GetUserInput("lastName"); obj.Model.LastName = name; }