Exemple #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)); });
        }
Exemple #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));
        }