Ejemplo n.º 1
0
        public void CaryToNextDay()
        {
            var got = new HourList("23-1am");

            Aver.AreEqual(1, got.Spans.Count());
            Aver.AreEqual(60 * 23, got.Spans.First().StartMinute);
            Aver.AreEqual(2 * 60, got.Spans.First().DurationMinutes);
            got.See();
        }
Ejemplo n.º 2
0
        public void TwelvePM()
        {
            var got = new HourList("23-12pm");

            Aver.AreEqual(1, got.Spans.Count());
            Aver.AreEqual(60 * 23, got.Spans.First().StartMinute);
            Aver.AreEqual(60, got.Spans.First().DurationMinutes);
            got.See();
        }
Ejemplo n.º 3
0
        public void Multiple01()
        {
            var got = new HourList("8-12, 12:30-5pm, 23-1:12am");

            Aver.AreEqual(3, got.Spans.Count());
            Aver.AreEqual(8 * 60, got.Spans.First().StartMinute);
            Aver.AreEqual(4 * 60, got.Spans.First().DurationMinutes);

            Aver.AreEqual(12 * 60 + 30, got.Spans.Skip(1).First().StartMinute);
            Aver.AreEqual(4 * 60 + 30, got.Spans.Skip(1).First().DurationMinutes);

            Aver.AreEqual(23 * 60, got.Spans.Skip(2).First().StartMinute);
            Aver.AreEqual(2 * 60 + 12, got.Spans.Skip(2).First().DurationMinutes);

            got.See();
        }