Exemple #1
0
        public void RentPerDay_AmountIs4000whenDurationIs2()
        {
            rentDC.Type     = "d";
            rentDC.Duration = 2;
            rentDC.Cuit     = "20112223336";

            Assert.Equal(4000, carRental.CalculateAmount(RentFactory.CreateRent(rentDC)));
        }
Exemple #2
0
        public void RentPerKm_AmountIs110whenDurationIs1()
        {
            rentDC.Type     = "k";
            rentDC.Duration = 1;
            rentDC.Cuit     = "20112223336";

            Assert.Equal(110, carRental.CalculateAmount(RentFactory.CreateRent(rentDC)));
        }
Exemple #3
0
        public void HourlyRent_AmountIs300whenDurationIs3()
        {
            rentDC.Type     = "h";
            rentDC.Duration = 3;
            rentDC.Cuit     = "20112223336";

            Assert.Equal(300, carRental.CalculateAmount(RentFactory.CreateRent(rentDC)));
        }
Exemple #4
0
        public void RentFactoryReturnsRentPerHourWhenTypeIsH()
        {
            var rentDC = new RentDataContract()
            {
                Type = "h"
            };

            var rent = RentFactory.CreateRent(rentDC);

            Assert.IsType <RentPerHour>(rent);
        }
Exemple #5
0
        public void RentFactoryReturnsRentPerKilometreWhenTypeIsk()
        {
            var rentDC = new RentDataContract()
            {
                Type = "k"
            };

            var rent = RentFactory.CreateRent(rentDC);

            Assert.IsType <RentPerKilometre>(rent);
        }