public void ApplyOperatorEqualityMustReturnExpectedResultForClassObjectsWithDifferentEqualsResultAndExpectedEqualFalse() { // Arrange var first = new BikeOperatorEqualityClassObject("Giant", "Revolt", 2020); var second = new BikeOperatorEqualityClassObject("Giant", "Liv", 2020); // Act var result = EqComponent.ApplyOperatorEquality <BikeOperatorEqualityClassObject>(first, second, false); // Assert result.Should().BeSuccess(); }
public void ApplyOperatorInequalityMustReturnExpectedResultForClassObjectsThatAreActuallyUnequalTrueAndExpectedUnequalFalse() { // Arrange var first = new BikeOperatorEqualityClassObject("Giant", "Revolt", 2020); var second = new BikeOperatorEqualityClassObject("Giant", "Liv", 2020); // Act var result = EqComponent.ApplyOperatorInequality <BikeOperatorEqualityClassObject>(first, second, false); // Assert result.Should().BeFailure("Inequality operator returned 'true' on expected equal objects."); }
public void ApplyOperatorEqualityMustReturnExpectedResultForClassObjectsWithDifferentEqualsResultAndExpectedEqualTrue() { // Arrange var first = new BikeOperatorEqualityClassObject("Giant", "Revolt", 2020); var second = new BikeOperatorEqualityClassObject("Giant", "Liv", 2020); // Act var result = EqComponent.ApplyOperatorEquality <BikeOperatorEqualityClassObject>(first, second, true); // Assert result.Should().BeFailure("Equality operator returned 'false' on expected equal objects."); }
public void ApplyOperatorInequalityMustReturnExpectedResultForClassObjectsThatAreActuallyUnequalTrueAndExpectedUnequalTrue() { // Arrange var first = new BikeOperatorEqualityClassObject("Giant", "Revolt", 2020); var second = new BikeOperatorEqualityClassObject("Giant", "Liv", 2020); // Act var result = EqComponent.ApplyOperatorInequality <BikeOperatorEqualityClassObject>(first, second, true); // Assert result.Should().BeSuccess(); }