public void EpochMilleniumDateToEpochFromDateTimeTest() { DateTime value = new DateTime(2000, 1, 1, 0, 0, 0); double result = value.ToEpochFromDateTime(); const double ExpectedValue = 946684800.0; Assert.AreEqual(ExpectedValue, result); }
public void EpochNegativeToEpochFromDateTimeTest() { DateTime value = new DateTime(1969, 1, 1, 0, 0, 0); double result = value.ToEpochFromDateTime(); Assert.IsTrue(result < 0); }
public void ZeroEpochDateToEpochStringTest() { DateTime? value = new DateTime(1970, 1, 1, 0, 0, 0); double? result = value.ToEpochFromDateTime(); Assert.IsTrue(result.HasValue); Assert.AreEqual(0, result.Value); }
public void MilleniumEpochDateToEpochStringTest() { DateTime? value = new DateTime(2000, 1, 1, 0, 0, 0); double? result = value.ToEpochFromDateTime(); Assert.AreEqual(946684800, result); }
public void EpochZeroToEpochFromDateTimeTest() { DateTime value = new DateTime(1970, 1, 1, 0, 0, 0); double result = value.ToEpochFromDateTime(); Assert.AreEqual(0, result); }
public void EpochPositiveToEpochFromDateTimeTest() { DateTime value = new DateTime(1971, 1, 1, 0, 0, 0); double result = value.ToEpochFromDateTime(); Assert.IsTrue(result > 0); }