Esempio n. 1
0
        public void DifferentDayWithoutTimeTest()
        {
            DateTime start    = new DateTime(2013, 12, 15);
            DateTime end      = new DateTime(2013, 12, 16);
            TimeSpan duration = new TimeSpan(3, 4, 5);

            TimeFormatter formatter = new TimeFormatter();
            string        interval  = formatter.GetInterval(
                start,
                end,
                IntervalEdge.Open,
                IntervalEdge.Open,
                duration);

            string expectedInterval = string.Concat(
                "(",
                formatter.GetShortDate(start),
                formatter.StartEndSeparator,
                formatter.GetShortDate(end),
                ")",
                formatter.DurationSeparator,
                formatter.GetDuration(duration));

            Assert.Equal(interval, expectedInterval);
        } // DifferentDayWithoutTimeTest