Exemplo n.º 1
0
 public void Convert(double timestamp, DateTime expectedDateTime)
 {
     Assert.Equal(expectedDateTime, UnixTimestampConverter.ToDateTime(timestamp));
     Assert.Equal(timestamp, UnixTimestampConverter.FromDateTime(UnixTimestampConverter.ToDateTime(timestamp)), 3);
 }
Exemplo n.º 2
0
        public void TestToDateTime()
        {
            DateTime resultDateTime = UnixTimestampConverter.ToDateTime(1585283580);

            Assert.AreEqual(new DateTime(2020, 3, 27, 4, 33, 0), resultDateTime);
        }