public void GetHashCode_EqualNames_SameHashCode() { // arrange string name = "rolf"; SectionXml original = new SectionXml(); original.Name = name; SectionXml other = new SectionXml(); other.Name = name; // act // assert Assert.AreEqual( original.GetHashCode(), other.GetHashCode() ); }
public void GetHashCode_DifferentNames_DifferentHashCode() { // arrange SectionXml original = new SectionXml(); original.Name = "rolf"; SectionXml other = new SectionXml(); other.Name = "bert"; // act // assert Assert.AreNotEqual( original.GetHashCode(), other.GetHashCode() ); }