public void ApplyEqualsMustReturnExpectedResultForClassObjectsWithDifferentEqualsResultAndExpectedEqualFalse() { // Arrange var first = new BikeWithEqualsClassObject("Giant", "Revolt", 2020); var second = new BikeWithEqualsClassObject("Giant", "Liv", 2020); // Act var result = EqComponent.ApplyEquals <BikeWithEqualsClassObject>(first, second, false); // Assert result.Should().BeSuccess(); }
public void ApplyEqualsMustReturnExpectedResultForClassObjectsWithDifferentEqualsResultAndExpectedEqualTrue() { // Arrange var first = new BikeWithEqualsClassObject("Giant", "Revolt", 2020); var second = new BikeWithEqualsClassObject("Giant", "Liv", 2020); // Act var result = EqComponent.ApplyEquals <BikeWithEqualsClassObject>(first, second, true); // Assert result.Should().BeFailure("Equals returned 'false' on expected equal objects."); }