Beispiel #1
0
        public void RightShouldSucceed()
        {
            // Arrange
            var value = "value";

            // Act
            EitherRight <string> right = Right <string>(value);

            // Assert
            right.ToString().Should().Be("Right(value)");
        }
Beispiel #2
0
        public void ToStringShouldProvideExpectedRepresentation()
        {
            // Arrange
            var value          = "right";
            var expectedResult = $"Right({value})";
            var eitherRight    = new EitherRight <string>(value);

            // Act
            var result = eitherRight.ToString();

            // Assert
            result.Should().Be(expectedResult);
        }