public void TotalPriceDogBath_Receiving_Weekend_Date() { // Arrange var chowChawGas = new ChowChawGas(30.0m, 45.0m, 800); DateTime date = DateTime.Parse("28/07/2019"); // Act PetShopResponseViewModel petShopResponse = chowChawGas.GetTotalPrice(4, 5, date); // Assert Assert.AreEqual(petShopResponse.TotalPriceDogBath, 345); }
public void TotalPriceDogBath_Receiving_Midweek_Date() { // Arrange var chowChawGas = new ChowChawGas(30.0m, 45.0m, 800); DateTime date = DateTime.Parse("03/08/2018"); // Act PetShopResponseViewModel petShopResponse = chowChawGas.GetTotalPrice(3, 5, date); // Assert Assert.AreEqual(petShopResponse.TotalPriceDogBath, 315); }
public PetShopResponseViewModel GetBetterPetShop(PetShopInputViewModel petShopInput) { var petShopResponseList = new List <PetShopResponseViewModel>(); var vaiRex = new VaiRex(15.0m, 50.0m, 1700); var meuCaninoFeliz = new MeuCaninoFeliz(20.0m, 40.0m, 2000); var chowChawGas = new ChowChawGas(30.0m, 45.0m, 800); PetShopResponseViewModel totalPriceVaiRexPetShop = vaiRex.GetTotalPrice(petShopInput.QuantitySmallDogs, petShopInput.QuantityBigDogs, petShopInput.DateOfBath); PetShopResponseViewModel totalPriceMeuCaninoFelizPetShop = meuCaninoFeliz.GetTotalPrice(petShopInput.QuantitySmallDogs, petShopInput.QuantityBigDogs, petShopInput.DateOfBath); PetShopResponseViewModel totalPriceChowChawGasPetShop = chowChawGas.GetTotalPrice(petShopInput.QuantitySmallDogs, petShopInput.QuantityBigDogs, petShopInput.DateOfBath); petShopResponseList.Add(totalPriceVaiRexPetShop); petShopResponseList.Add(totalPriceMeuCaninoFelizPetShop); petShopResponseList.Add(totalPriceChowChawGasPetShop); return(petShopResponseList.OrderBy(p => p.TotalPriceDogBath).ThenBy(p => p.DogKennelDistanceMetre).FirstOrDefault()); }