public void Equals_should_return_true_if_all_fields_are_equal() { var wMode1 = new WriteConcern.WMode("mode"); var wMode2 = new WriteConcern.WMode("mode"); wMode1.Equals(wMode2).Should().BeTrue(); wMode1.Equals((object)wMode2).Should().BeTrue(); wMode1.GetHashCode().Should().Be(wMode2.GetHashCode()); }
public void Equals_should_return_false_if_values_are_not_equal(string value1, string value2) { var wMode1 = new WriteConcern.WMode(value1); var wMode2 = new WriteConcern.WMode(value2); wMode1.Equals(wMode2).Should().BeFalse(); wMode1.Equals((object)wMode2).Should().BeFalse(); wMode1.GetHashCode().Should().NotBe(wMode2.GetHashCode()); }