public void EquableNullMustPassWhenRight() { // Arrange var either = new Either <string, int>(1); // Act var result = new Equable().Null(either); // Assert result.Should().Pass(); }
public void NullMustSucceed() { // Arrange var obj = new BikeClassObject("Giant", "Revolt", 2020); // Act var result = new Equable().Null(obj); // Assert result.Should().Pass(); }
public void EquableNullMustPass() { // Arrange Option <int> option = Some(1); // Act var result = new Equable().Null(option); // Assert result.Should().Pass(); }
public void EquableNullMustPass() { // Arrange Unit unit = new Unit(); // Act var result = new Equable().Null(unit); // Assert result.Should().Pass(); }
public void EqualMustSucceed() { // Arrange var first = new BikeClassObject("Giant", "Revolt", 2020); var second = new BikeClassObject("Giant", "Revolt", 2020); // Act var result = new Equable().Equal(first, second); // Assert result.Should().Pass(); }
public void EquableUnequalMustPassWhenFirstRightAndSecondLeft() { // Arrange var first = new Either <string, int>(1); var second = new Either <string, int>("left"); // Act var result = new Equable().Unequal(first, second); // Assert result.Should().Pass(); }
public void EquableEqualMustPassWhenBothRight() { // Arrange var first = new Either <string, int>(1); var second = new Either <string, int>(1); // Act var result = new Equable().Equal(first, second); // Assert result.Should().Pass(); }
public void EquableNullMustPassWhenException() { // Arrange var exception = new SomeException(); Exceptional <string> exceptional = exception; // Act var result = new Equable().Null(exceptional); // Assert result.Should().Pass(); }
public void EquableNullMustPassWhenSuccess() { // Arrange var value = "any value of any type besides Exception"; Exceptional <string> exceptional = value; // Act var result = new Equable().Null(exceptional); // Assert result.Should().Pass(); }
public void EquableUnequalMustPassWhenSomeAndNone() { // Arrange Option <int> first = Some(1); Option <int> second = None; // Act var result = new Equable().Unequal(first, second); // Assert result.Should().Pass(); }
public void EquableEqualMustPassWhenNone() { // Arrange Option <int> first = None; Option <int> second = None; // Act var result = new Equable().Equal(first, second); // Assert result.Should().Pass(); }
public void EquableEqualMustPass() { // Arrange Unit first = new Unit(); Unit second = new Unit(); // Act var result = new Equable().Equal(first, second); // Assert result.Should().Pass(); }
public void EquableUnequalMustPassWhenFirstExceptionAndSecondSuccess() { // Arrange var firstException = new SomeException(); Exceptional <string> first = firstException; var value = "any value of any type besides Exception"; Exceptional <string> second = value; // Act var result = new Equable().Unequal(first, second); // Assert result.Should().Pass(); }
public void EquableEqualMustPassWhenBothException() { // Arrange var firstException = new SomeException(); Exceptional <string> first = firstException; var secondException = new SomeException(); Exceptional <string> second = secondException; // Act var result = new Equable().Equal(first, second); // Assert result.Should().Pass(); }
public void EquableEqualMustPassWhenBothSuccess() { // Arrange var firstValue = "any value of any type besides Exception"; Exceptional <string> first = firstValue; var secondValue = "any value of any type besides Exception"; Exceptional <string> second = secondValue; // Act var result = new Equable().Equal(first, second); // Assert result.Should().Pass(); }
public void EquableUnequalMustNotPass() { // Arrange Unit first = new Unit(); Unit second = new Unit(); // Act var result = new Equable().Unequal(first, second); // Assert result.Should().NotPass("Equals returned 'true' on expected non-equal objects.", "Typed Equals returned 'true' on expected non-equal objects.", "Equality operator returned 'true' on expected non-equal objects.", "Inequality operator returned 'false' on expected non-equal objects."); }