コード例 #1
0
        public void Faulted_Node_Throws_If_Throw_On_Error_True()
        {
            var testNode = new FaultingTestNodeA();

            var testObjectList = GetTestObjects();

            Assert.ThrowsAsync <AggregateException>(() => testNode.ExecuteManyAsync(testObjectList, new ExecutionOptions {
                ThrowOnError = true, DegreeOfParallelism = 4
            }));
        }
コード例 #2
0
        public async Task Faulted_Node_Run_Status_Is_Failed_If_Continue_On_Failure_True()
        {
            var testNode = new FaultingTestNodeA();

            var testObjectList = GetTestObjects();

            var result = await testNode.ExecuteManyAsync(testObjectList, new ExecutionOptions { ContinueOnFailure = true, DegreeOfParallelism = 4 });

            result.Status.Should().Be(NodeResultStatus.Failed);
            result.Exception.Should().NotBeNull();
            testNode.Status.Should().Be(NodeRunStatus.Faulted);
        }
コード例 #3
0
        public void Faulted_Node_Throws_If_Throw_On_Error_True()
        {
            var testNode = new FaultingTestNodeA();

            var testObject1 = new TestObjectA();
            var testObject2 = new TestObjectA();

            var testObjectList = new List <TestObjectA> {
                testObject1, testObject2
            };

            Assert.ThrowsAsync <AggregateException>(() => testNode.ExecuteManyAsync(testObjectList, new ExecutionOptions {
                ThrowOnError = true
            }));
        }
コード例 #4
0
        public async Task Faulted_Node_Run_Status_Is_Failed_If_Continue_On_Failure_True()
        {
            var testNode = new FaultingTestNodeA();

            var testObject1 = new TestObjectA();
            var testObject2 = new TestObjectA();

            var testObjectList = new List <TestObjectA> {
                testObject1, testObject2
            };

            var result = await testNode.ExecuteManyAsync(testObjectList, new ExecutionOptions { ContinueOnFailure = true });

            result.Status.Should().Be(NodeResultStatus.Failed);
            result.Exception.Should().NotBeNull();
            testNode.Status.Should().Be(NodeRunStatus.Faulted);
        }