public async Task testWorkflow() { ProcessHelloWorld p = new ProcessHelloWorld(0); bool retval = await p.Execute(); Assert.True(retval); Assert.Empty(p.ExecutionErrors); Assert.Empty(p.ValidationErrors); Assert.NotEmpty(p.messages); }
public async Task <ActionResult> Get(int val) { var process = new ProcessHelloWorld(val); if (!process.ExecutionErrors.Any()) { var retval = await process.Execute(); if (retval) { return(Content(JsonConvert.SerializeObject(process.messages), "application/json")); } } return(BadRequest("error trying to retreive messages")); }