Beispiel #1
0
        public void ReturnDate30DaysInFuture_WhenProposedDateFallsOnWeekday()
        {
            // arrange
            var      pd         = new SUT.PaymentSystem.PaymentDate();
            DateTime sampleDate = DateTime.Parse("7/6/2011");
            // act
            var futureDate = pd.CalculateFuturePaymentDate(sampleDate);

            // assert

            Assert.AreEqual(sampleDate.AddDays(30), futureDate);
        }
Beispiel #2
0
        public void ReturnMonday_WhenProposedDateFallsOnSaturday()
        {
            // arrange
            var pd = new SUT.PaymentSystem.PaymentDate();

            DateTime sampleDate = DateTime.Parse("7/7/2011");

            // act
            var resultDateWhichShouldBeMonday = pd.CalculateFuturePaymentDate(sampleDate);

            // assert

            Assert.AreEqual(DayOfWeek.Monday, resultDateWhichShouldBeMonday.DayOfWeek);
        }