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