Beispiel #1
0
        public void TimeElapsedInDaysSince_InvalidGameDate_ReturnZero()
        {
            //ARRANGE
            CustomDateTime time = new CustomDateTime(5196, 7, 11);;
            //ACT
            long days = time.TimeElapsedInDaysSince(new StandardDateTime(new System.DateTime(5196, 11, 1)));

            //ASSERT
            Assert.AreEqual(0, days);
        }
Beispiel #2
0
        public void TimeElapsedInDaysSince_ValidGameDate_ReturnCorrectNumberOfDays()
        {
            //ARRANGE
            CustomDateTime time = new CustomDateTime(5196, 7, 11);

            time.SetNumberOfDaysPerMonth(20);
            time.SetNumberOfMonthsInYear(18);
            //ACT
            long days = time.TimeElapsedInDaysSince(new CustomDateTime(5196, 11, 1, 1, 2));

            //ASSERT
            Assert.AreEqual(360, time.GetNumberOfDaysInYear());
            Assert.AreEqual(70, days);
        }