예제 #1
0
        public void GetEmptyDateTimeTest()
        {
            var dateTime = DateTime.Today;
            var time     = new TimeValue();

            time.GetDateTime(dateTime).Should().Be(dateTime);
        }
예제 #2
0
        public void GetDateTimeTest()
        {
            var dateTime = DateTime.Now;
            var timeSpan = new TimeSpan(0, 18, 23, 56, 344);
            var time     = new TimeValue(timeSpan.Hours, timeSpan.Minutes, timeSpan.Seconds, timeSpan.Milliseconds);

            time.GetDateTime(dateTime).Should().Be(dateTime.Date.Add(timeSpan));
        }
예제 #3
0
        public void GetEmptyDateTimeTest() {
            var dateTime = DateTime.Today;
            var time = new TimeValue();

            time.GetDateTime(dateTime).Should().Be(dateTime);
        }
예제 #4
0
        public void GetDateTimeTest() {
            var dateTime = DateTime.Now;
            var timeSpan = new TimeSpan(0, 18, 23, 56, 344);
            var time = new TimeValue(timeSpan.Hours, timeSpan.Minutes, timeSpan.Seconds, timeSpan.Milliseconds);

            time.GetDateTime(dateTime).Should().Be(dateTime.Date.Add(timeSpan));
        }