Пример #1
0
        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);
        }
Пример #2
0
 public static Result <int, CustomError> FailWithCustomError(CustomError error)
 {
     return(Fail(error));
 }