Ejemplo n.º 1
0
        public void CodeActivity_FailsWhenInnerTaskFails()
        {
            int delay = 1000;

            FailsAfterDelayCodeActivity mock = new FailsAfterDelayCodeActivity()
            {
                Delay           = delay,
                ContinueOnError = false
            };
            WorkflowInvokerTest invoker = new WorkflowInvokerTest(mock);

            Assert.Throws <NotImplementedException>(() => { invoker.TestActivity(TimeSpan.FromMilliseconds(delay * 2)); });
        }
Ejemplo n.º 2
0
        public void CodeActivity_ContinuesWhenInnerTaskFails()
        {
            int delay = 1000;

            FailsAfterDelayCodeActivity mock = new FailsAfterDelayCodeActivity()
            {
                Delay           = delay,
                ContinueOnError = true
            };
            WorkflowInvokerTest invoker = new WorkflowInvokerTest(mock);

            invoker.TestActivity(TimeSpan.FromMilliseconds(delay * 2));
        }