public void Equals_should_return_true_if_all_fields_are_equal(int w) { var wCount1 = new WriteConcern.WCount(w); var wCount2 = new WriteConcern.WCount(w); wCount1.Equals(wCount2).Should().BeTrue(); wCount1.Equals((object)wCount2).Should().BeTrue(); wCount1.GetHashCode().Should().Be(wCount2.GetHashCode()); }
public void Equals_should_return_false_if_any_fields_are_not_equal(int w1, int w2) { var wCount1 = new WriteConcern.WCount(w1); var wCount2 = new WriteConcern.WCount(w2); wCount1.Equals(wCount2).Should().BeFalse(); wCount1.Equals((object)wCount2).Should().BeFalse(); wCount1.GetHashCode().Should().NotBe(wCount2.GetHashCode()); }