public void FailWithCustomError() { var error = new CustomError("The custom error"); var result = Order.FailWithCustomError(error); Assert.True(error == result.Error); Assert.True(result.Error == error); Assert.True(error.Equals(error)); Assert.True(result.Error.Equals(error)); Assert.Equal(result.Error.CustomValue, error.CustomValue); Assert.False(result.Succeeded); }
public static Result <int, CustomError> FailWithCustomError(CustomError error) { return(Fail(error)); }