Пример #1
0
        public void ToStringOfFailureContainsTheError()
        {
            var errorString = "ToString() method result of error object";
            var error       = new ToStringObjectStub(errorString);
            Result <DummyStructure, ToStringObjectStub> failure = error; // implicit conversion

            var failureString = failure.ToString();

            StringAssert.Contains(errorString, failureString);
        }
Пример #2
0
        public void ToStringOfSuccessContainsTheValue()
        {
            var valueString = "ToString() method result of value object";
            var value       = new ToStringObjectStub(valueString);
            Result <ToStringObjectStub, DummyStructure> success = value; // implicit conversion

            var successString = success.ToString();

            StringAssert.Contains(valueString, successString);
        }