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);
        }
Exemple #2
0
 public static Result <int, CustomError> FailWithCustomError(CustomError error)
 {
     return(Fail(error));
 }