public void Faulted_Sync_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 <Exception>(() => testNode.ExecuteManySeriallyAsync(testObjectList, new ExecutionOptions { ThrowOnError = true })); }
public async Task Faulted_Sync_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.ExecuteManySeriallyAsync(testObjectList, new ExecutionOptions { ContinueOnFailure = true }); result.Status.Should().Be(NodeResultStatus.Failed); result.Exception.Should().NotBeNull(); testNode.Status.Should().Be(NodeRunStatus.Faulted); }