public void ToStringShouldProvideExpectedRepresentation() { // Arrange var expectedResult = "None"; var optionNone = new OptionNone(); // Act var result = optionNone.ToString(); // Assert result.Should().Be(expectedResult); }
public void ImplicitOperatorOverloadingShouldSucceedWithOptionNone() { // Arrange var optionNone = new OptionNone(); // Act Option <string> option = optionNone; var result = option.ToString(); // Assert result.Should().Be("None"); }
public void EqualsOptionNoneShouldSucceed() { // Arrange var first = new OptionNone(); var second = new OptionNone(); // Act var result = first.Equals(second); // Assert result.Should().BeTrue(); }
public void EqualsOptionNoneShouldReturnFalse() { // Arrange OptionNone optionNone = OptionNone.Default; Option <int> option = Some(1); // Act var result = option.Equals(optionNone); // Assert result.Should().BeFalse(); }
public void CtorShouldEqualWithDefault() { // Arrange var first = new OptionNone(); var second = default(OptionNone); // Act var result = Equals(first, second); // Assert result.Should().BeTrue(); }