コード例 #1
0
        public void FineIsDaysLateTimesBasis()
        {
            var daysLate = 1;

            Assert.That(policy.FineAmount(daysLate++), Is.EqualTo(BookCheckoutPolicy.DailyFineBasis * 1));
            Assert.That(policy.FineAmount(daysLate++), Is.EqualTo(BookCheckoutPolicy.DailyFineBasis * 2));
            Assert.That(policy.FineAmount(daysLate), Is.EqualTo(BookCheckoutPolicy.DailyFineBasis * 3));
        }
コード例 #2
0
        public void FineIsDaysLateTimesBasis()
        {
            var daysLate = 1;

            Assert.Equal(BookCheckoutPolicy.DailyFineBasis * 1, policy.FineAmount(daysLate++));
            Assert.Equal(BookCheckoutPolicy.DailyFineBasis * 2, policy.FineAmount(daysLate++));
            Assert.Equal(BookCheckoutPolicy.DailyFineBasis * 3, policy.FineAmount(daysLate));
        }
コード例 #3
0
        public void DailyAccumulatingFine()
        {
            var daysLate = 1;

            Assert.That(policy.FineAmount(daysLate++), Is.EqualTo(MovieCheckoutPolicy.PenaltyAmount + MovieCheckoutPolicy.DailyFineBasis * 1));
            Assert.That(policy.FineAmount(daysLate++), Is.EqualTo(MovieCheckoutPolicy.PenaltyAmount + MovieCheckoutPolicy.DailyFineBasis * 2));
            Assert.That(policy.FineAmount(daysLate), Is.EqualTo(MovieCheckoutPolicy.PenaltyAmount + MovieCheckoutPolicy.DailyFineBasis * 3));
        }
コード例 #4
0
        public void DailyAccumulatingFine()
        {
            var daysLate = 1;

            Assert.Equal(MovieCheckoutPolicy.PenaltyAmount + MovieCheckoutPolicy.DailyFineBasis * 1, policy.FineAmount(daysLate++));
            Assert.Equal(MovieCheckoutPolicy.PenaltyAmount + MovieCheckoutPolicy.DailyFineBasis * 2, policy.FineAmount(daysLate++));
            Assert.Equal(MovieCheckoutPolicy.PenaltyAmount + MovieCheckoutPolicy.DailyFineBasis * 3, policy.FineAmount(daysLate));
        }