Пример #1
0
        public void Should_return_max_60_per_day()
        {
            var input = new DateTime[24];

            for (int i = 0; i < 24; i++)
            {
                input[i] = new DateTime(2020, 11, 30, i, 30, 00);
            }
            Assert.AreEqual(60, Calculator.CalculateTotalFee(input));
        }
Пример #2
0
        public void Should_return_correct_daily_fee_with_multiple_passages_per_hour()
        {
            var input = new DateTime[] {
                new DateTime(2020, 11, 30, 00, 15, 00),
                new DateTime(2020, 11, 30, 06, 15, 00),
                new DateTime(2020, 11, 30, 06, 45, 00),
                new DateTime(2020, 11, 30, 06, 55, 00),
                new DateTime(2020, 11, 30, 11, 55, 00),
                new DateTime(2020, 11, 30, 14, 55, 00),
                new DateTime(2020, 11, 30, 15, 15, 00),
                new DateTime(2020, 11, 30, 15, 35, 00)
            };

            Assert.AreEqual(39, Calculator.CalculateTotalFee(input));
        }