Exemple #1
0
        public void CreateMonth()
        {
            //arrange
            Months monthName = Months.January;
            int monthSize = 31;

            //act
            Month january = new Month(monthName, WeekDays.Thursday, monthSize);

            //assert
            Assert.AreEqual(monthName, january.MonthTitle);
            Assert.AreEqual(WeekDays.Thursday, january.MonthStart);
            Assert.AreEqual(monthSize, january.MonthSize);
            Assert.IsNotNull(january.workWeeks);
        }
Exemple #2
0
 /// <summary>
 /// Method to Initialize Month Objects in the months array.
 /// </summary>
 private void InitializeMonths()
 {
     //string whichMonth, WeekDays startDay, int numberOfDays
     months[0] = new Month(YearBeginDate, 31);
     months[1] = new Month(YearBeginDate.AddMonths(1), 28);
     months[2] = new Month(YearBeginDate.AddMonths(2), 31);
     months[3] = new Month(YearBeginDate.AddMonths(3), 30);
     months[4] = new Month(YearBeginDate.AddMonths(4), 31);
     months[5] = new Month(YearBeginDate.AddMonths(5), 30);
     months[6] = new Month(YearBeginDate.AddMonths(6), 31);
     months[7] = new Month(YearBeginDate.AddMonths(7), 31);
     months[8] = new Month(YearBeginDate.AddMonths(8), 30);
     months[9] = new Month(YearBeginDate.AddMonths(9), 31);
     months[10] = new Month(YearBeginDate.AddMonths(10), 30);
     months[11] = new Month(YearBeginDate.AddMonths(11), 31);
 }