Пример #1
0
        public void NativeActivity_FailsWhenInnerTaskFails()
        {
            int delay = 1000;

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

            Assert.Throws <NotImplementedException>(() => { invoker.TestActivity(TimeSpan.FromMilliseconds(delay * 2)); });
        }
Пример #2
0
        public void NativeActivity_ContinuesWhenInnerTaskFails()
        {
            int delay = 1000;

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

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