Exemplo n.º 1
0
        public void EpochToDateTime_Null()
        {
            var expected = (DateTime?)null;
            var input    = (long?)null;

            var result = DateTimeExtensions.FromEpoch(input);

            Assert.AreEqual(expected, result);
        }
Exemplo n.º 2
0
        public void EpochToDateTime_3601()
        {
            var expected = new DateTime(1970, 1, 1, 1, 0, 1, 0, DateTimeKind.Utc);
            var input    = 3601;

            var result = DateTimeExtensions.FromEpoch(input);

            Assert.AreEqual(expected, result);
        }
Exemplo n.º 3
0
        public void EpochToDateTime_n1()
        {
            var expected = new DateTime(1969, 12, 31, 23, 59, 59, 0, DateTimeKind.Utc);
            var input    = -1;

            var result = DateTimeExtensions.FromEpoch(input);

            Assert.AreEqual(expected, result);
        }