public void GetTimestampTest() { DateTime now = DateTime.Now; long timestamp = now.GetTimestamp(); DateTime time = DateTimeUtility.FromTimestamp(timestamp); Assert.AreEqual(now.Kind, time.Kind); Assert.AreEqual(now.Year, time.Year); Assert.AreEqual(now.Month, time.Month); Assert.AreEqual(now.Day, time.Day); Assert.AreEqual(now.Hour, time.Hour); Assert.AreEqual(now.Minute, time.Minute); Assert.AreEqual(now.Second, time.Second); Assert.AreEqual(now.Millisecond, time.Millisecond); }