Пример #1
0
        public void TestGetHashCode()
        {
            YearMonthDay ymd1 = new YearMonthDay(2006, 3, 14);
            YearMonthDay ymd2 = new YearMonthDay(2006, 3, 14);
            YearMonthDay ymd3 = new YearMonthDay(2006, 5, 26);

            Assert.AreEqual(ymd1.GetHashCode(), ymd2.GetHashCode());
            Assert.AreNotEqual(ymd1.GetHashCode(), ymd3.GetHashCode());
        }
Пример #2
0
 public void TestGetHashCode()
 {
     YearMonthDay ymd1 = new YearMonthDay(2006, 3, 14);
     YearMonthDay ymd2 = new YearMonthDay(2006, 3, 14);
     YearMonthDay ymd3 = new YearMonthDay(2006, 5, 26);
     Assert.AreEqual(ymd1.GetHashCode(), ymd2.GetHashCode());
     Assert.AreNotEqual(ymd1.GetHashCode(), ymd3.GetHashCode());
 }