public void RentPerDay_AmountIs4000whenDurationIs2() { rentDC.Type = "d"; rentDC.Duration = 2; rentDC.Cuit = "20112223336"; Assert.Equal(4000, carRental.CalculateAmount(RentFactory.CreateRent(rentDC))); }
public void RentPerKm_AmountIs110whenDurationIs1() { rentDC.Type = "k"; rentDC.Duration = 1; rentDC.Cuit = "20112223336"; Assert.Equal(110, carRental.CalculateAmount(RentFactory.CreateRent(rentDC))); }
public void HourlyRent_AmountIs300whenDurationIs3() { rentDC.Type = "h"; rentDC.Duration = 3; rentDC.Cuit = "20112223336"; Assert.Equal(300, carRental.CalculateAmount(RentFactory.CreateRent(rentDC))); }
public void RentFactoryReturnsRentPerHourWhenTypeIsH() { var rentDC = new RentDataContract() { Type = "h" }; var rent = RentFactory.CreateRent(rentDC); Assert.IsType <RentPerHour>(rent); }
public void RentFactoryReturnsRentPerKilometreWhenTypeIsk() { var rentDC = new RentDataContract() { Type = "k" }; var rent = RentFactory.CreateRent(rentDC); Assert.IsType <RentPerKilometre>(rent); }