示例#1
0
        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() );
        }
示例#2
0
        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() );
        }