public void TestEquals() { UniversalTime date0 = new UniversalTime(1974, 8, 16, 0, 30, 0); UniversalTime date1 = new UniversalTime(1974, 8, 10, 0, 30, 0); UniversalTime date2 = new UniversalTime(1974, 8, 20, 0, 30, 0); Assert.AreEqual(true, date0.Equals(date0)); Assert.AreEqual(false, date0.Equals(date1)); Assert.AreEqual(false, date0.Equals(date2)); object o = date0; Assert.AreEqual(true, date0.Equals(o)); o = date1; Assert.AreEqual(false, date0.Equals(o)); o = 123; Assert.AreEqual(false, date0.Equals(o)); }