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