Ejemplo n.º 1
0
        public void GoDay_SetMonth_Goes()
        {
            TimeWindowCore target = new TimeWindowCore(new DateTime(2012, 2, 6));

            target.GoMonth();
            target.GoDay();

            AssertDatesMatch(target,
                             new DateTime(2012, 2, 1),
                             new DateTime(2012, 2, 1),
                             "1st day on month");
        }
Ejemplo n.º 2
0
        public void GoDay_SetYear_Goes()
        {
            TimeWindowCore target = new TimeWindowCore(new DateTime(2011, 4, 10));

            target.GoYear();
            target.GoDay();

            AssertDatesMatch(target,
                             new DateTime(2011, 1, 1),
                             new DateTime(2011, 1, 1),
                             "1st Jan");
        }
Ejemplo n.º 3
0
        public void GoDay_SetWeek_Goes()
        {
            var target = new TimeWindowCore(new DateTime(2012, 2, 21));

            target.GoWeek();
            target.GoDay();

            AssertDatesMatch(target,
                             new DateTime(2012, 2, 19),
                             new DateTime(2012, 2, 19),
                             "21 Feb will expand to 19 to 25 feb, will change then to 19 feb");

            target = new TimeWindowCore(new DateTime(2012, 3, 2));
            target.GoWeek();
            target.GoDay();

            AssertDatesMatch(target,
                             new DateTime(2012, 2, 26),
                             new DateTime(2012, 2, 26),
                             "2nd march will expand to 26feb - 3 mar which will change to 26 feb");
        }