Пример #1
0
        public void TestGetTicks_InvalidDateTimeValuesDontCauseCrash()
        {
            var ts = new MockedTimeStamp()
            {
                Year           = 2017,
                Month          = 13,
                Day            = 34,
                Hours          = 32,
                Minutes        = 75,
                Seconds        = 92,
                Milliseconds10 = 991829
            } as IVtiTimeStamp;

            var calcTicks = ts.GetTicks();

            Assert.AreNotEqual("2017-13-34 32:75:92.992", new DateTime(calcTicks).ToString("yyyy-MM-dd HH:mm:ss.fff"));
        }
Пример #2
0
        public void TestGetTicks()
        {
            var ts = new MockedTimeStamp()
            {
                Year           = 2017,
                Month          = 7,
                Day            = 9,
                Hours          = 15,
                Minutes        = 56,
                Seconds        = 34,
                Milliseconds10 = 2308
            } as IVtiTimeStamp;

            var calcTicks = ts.GetTicks();

            Assert.AreEqual("2017-07-09 15:56:34.231", new DateTime(calcTicks).ToString("yyyy-MM-dd HH:mm:ss.fff"));
        }