Пример #1
0
            public void WhenFailure_IncludesError()
            {
                const string errorMessage = "Not the answer";
                var          result       = _failure.AddError(errorMessage);

                result.Errors.Should().Contain(errorMessage);
            }
Пример #2
0
            public void WhenSuccess_DiscardsValue()
            {
                var result = _success.AddError("Not the answer");

                result.HasValue.Should().BeFalse();
            }