Example #1
0
        public void GetBetterPetShop_MeuCaninoFeliz_Winner()
        {
            // Arrange
            string winnerPetShopName = "Meu Canino Feliz";
            var    petShopInput      = new PetShopInputViewModel()
            {
                DateOfBath        = DateTime.Parse("03/08/2018"),
                ErrorMessage      = String.Empty,
                QuantitySmallDogs = 3,
                QuantityBigDogs   = 5
            };

            // Act
            PetShopResponseViewModel petShopResponse = _petShopServices.GetBetterPetShop(petShopInput);

            // Assert
            Assert.AreEqual(petShopResponse.BestPetShopName, winnerPetShopName);
        }
Example #2
0
        static void Main(string[] args)
        {
            var  petShopInput     = new PetShopInputViewModel();
            bool inputDataIsValid = true;

            do
            {
                Console.WriteLine("Digite os dados de entrada no formato, <data> <Quant Caes pequenos> <Quant Caes grandes>:");
                petShopInput     = _programServices.FormatInputData(Console.ReadLine());
                inputDataIsValid = String.IsNullOrEmpty(petShopInput.ErrorMessage) ? true : false;
            } while (inputDataIsValid == false);

            var petShopResponse = _petShopService.GetBetterPetShop(petShopInput);

            Console.WriteLine($"Melhor Canil: {petShopResponse.BestPetShopName}");
            Console.WriteLine($"Preço Total: {petShopResponse.TotalPriceDogBath}");
            Console.ReadKey();
        }