Example #1
0
        public void Errant_Node_Run_With_ThrowOnError_True_Throws()
        {
            var testNode = new FaultingTestNodeA();

            var testObject = new TestObjectA();

            var context = new ExecutionContext <TestObjectA>(testObject)
            {
                GlobalOptions = { ThrowOnError = true }
            };

            Assert.Throws <Exception>(async() => await testNode.ExecuteAsync(context));
        }
Example #2
0
        public async void Errant_Node_Run_Status_Is_Faulted()
        {
            var testNode = new FaultingTestNodeA();

            var testObject = new TestObjectA();

            var context = new ExecutionContext <TestObjectA>(testObject);

            var result = await testNode.ExecuteAsync(context);

            result.Exception.ShouldNotBeNull();

            testNode.Status.ShouldEqual(NodeRunStatus.Faulted);
        }