예제 #1
0
        public void Ok_Failure()
        {
            var success = ErrorResult.WithError("error");
            var result  = success.Do(t => t.ToString(), f => f.ToUpper());

            Assert.That(result, Is.EqualTo("ERROR"));
        }
예제 #2
0
        public void Ok_Failure()
        {
            var result = ErrorResult.WithError("some_error");

            Assert.That(result.IsSuccess, Is.False);
            Assert.That(result.IsFailure, Is.True);
        }