public void OnFailure_unit_result_E_executes_E_action_on_failure_and_returns_self(bool isSuccess) { UnitResult <E> result = UnitResult.SuccessIf(isSuccess, E.Value); UnitResult <E> returned = result.OnFailure(ActionError); actionExecuted.Should().Be(!isSuccess); result.Should().Be(returned); }
public async Task OnFailure_AsyncRight_unit_result_E_executes_E_action_on_failure_and_returns_self(bool isSuccess) { UnitResult <E> result = UnitResult.SuccessIf(isSuccess, E.Value); UnitResult <E> returned = await result.OnFailure(AsyncActionError); actionExecuted.Should().Be(!isSuccess); result.Should().Be(returned); }