Ejemplo n.º 1
0
        public void TestGetHashCode()
        {
            JulianDate date1 = new JulianDate(2451545, 0.0);
            JulianDate date2 = new JulianDate(2451545, 1.0);
            JulianDate date3 = new JulianDate(2451545, 0.0);

            Assert.AreNotEqual(date1.GetHashCode(), date2.GetHashCode());
            Assert.AreEqual(date1.GetHashCode(), date3.GetHashCode());

            date1 = new JulianDate(2451545, 0.0, TimeStandard.InternationalAtomicTime);
            date2 = new JulianDate(2451545, 0.0, TimeStandard.CoordinatedUniversalTime);
            Assert.AreNotEqual(date1.GetHashCode(), date2.GetHashCode());
        }
Ejemplo n.º 2
0
        public void TestGetHashCode()
        {
            JulianDate date1 = new JulianDate(2451545, 0.0);
            JulianDate date2 = new JulianDate(2451545, 1.0);
            JulianDate date3 = new JulianDate(2451545, 0.0);
            Assert.AreNotEqual(date1.GetHashCode(), date2.GetHashCode());
            Assert.AreEqual(date1.GetHashCode(), date3.GetHashCode());

            date1 = new JulianDate(2451545, 0.0, TimeStandard.InternationalAtomicTime);
            date2 = new JulianDate(2451545, 0.0, TimeStandard.CoordinatedUniversalTime);
            Assert.AreNotEqual(date1.GetHashCode(), date2.GetHashCode());
        }