码迷,mamicode.com
首页 > Windows程序 > 详细

[C#] Assert.AreEqual DateTime

时间:2015-02-03 19:01:46      阅读:248      评论:0      收藏:0      [点我收藏+]

标签:

示例代码:

        [TestMethod()]
        public void DateTimeFromUnixTimestampMillisTest()
        {
            DateTime _actual = UnixEpochHelper.DateTimeFromUnixTimestampMillis(1422949956408);
            DateTime _expected = new DateTime(2015, 02, 03, 7, 52, 36);
            Assert.AreEqual(_expected.ToShortDateString(), _actual.ToShortDateString());
            Assert.AreEqual(_expected.ToShortTimeString(), _actual.ToShortTimeString());
            Assert.AreNotEqual(_expected, _actual);
        }

[C#] Assert.AreEqual DateTime

标签:

原文地址:http://www.cnblogs.com/Yan-Zhiwei/p/4270338.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!