public void ResultTry_execute_action_success_without_error_handler_function_result_expected() { var result = Result.Try(Action); result.IsSuccess.Should().BeTrue(); FuncExecuted.Should().BeTrue(); }
public async Task ResultTry_Async_execute_action_success_without_error_handler_function_result_expected() { var result = await Result.Try(Func_Task); result.IsSuccess.Should().BeTrue(); FuncExecuted.Should().BeTrue(); }
public void ResultTry_T_E_execute_function_success_without_error_handler_function_result_expected() { var result = Result.Try(Func_T, ErrorHandlerE); result.IsSuccess.Should().BeTrue(); result.Value.Should().Be(T.Value); FuncExecuted.Should().BeTrue(); }
public void OnSuccessTry_T_execute_action_success_without_error_handler_function_result_expected() { var success = Result.Success(T.Value); var result = success.OnSuccessTry(Action_T); result.IsSuccess.Should().BeTrue(); FuncExecuted.Should().BeTrue(); }
public void OnSuccessTry_T_K_E_execute_function_success_without_error_handler_function_result_expected() { var success = Result.Success <T, E>(T.Value); var result = success.OnSuccessTry(Func_T_K, ErrorHandlerE); result.IsSuccess.Should().BeTrue(); result.Value.Should().Be(K.Value); FuncExecuted.Should().BeTrue(); }