public void Test_CalculateDeptCustomer()
        {
            Customer customer = new Customer("Nick");

            customer.Rentals.Add(new Rental(Scooter.BMW("RX250"), 4));
            customer.Rentals.Add(new Rental(Scooter.Honda("M80"), 3));
            Assert.AreEqual(customer.CalculateDept(), 12 * 4 + 7 * 3);
        }
Пример #2
0
        static void Main(string[] args)
        {
            Customer customer = new Customer("Nick");

            customer.Rentals.Add(new Rental(Scooter.BMW("FX300"), 4));
            customer.Rentals.Add(new Rental(Scooter.Honda("M250"), 4));
            customer.Rentals.Add(new Rental(Scooter.Suzuki("RX5"), 5));
            var result = customer.CalculateDept();

            Console.WriteLine($"Client {customer.Name}. Dept - {result}");

            ReportManager.CreateSimpleReport(@"D:\\ReportTest.txt", customer);
        }