Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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"));
        }