public void Equals_should_use_custom_logic() { var first = new CustomEquals(); first.X = 1; var second = new CustomEquals(); second.X = 2; var result = first.Equals(second); Assert.True(result); Assert.True(first.CustomCalled); }
bool Custom(CustomEquals other) { return(X == 1 && other.X == 2 || X == 2 && other.X == 1); }
bool CustomEqualsMethod(CustomEquals other) { this.CustomCalled = true; return(X == 1 && other.X == 2 || X == 2 && other.X == 1); }