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