Exemplo n.º 1
0
        public string NailTrim(string name, int procedureTime)
        {
            var animal = GetAnimal(name);

            nailTrim.DoService(animal, procedureTime);
            return($"{animal.Name} had nail trim procedure");
        }
Exemplo n.º 2
0
        public string NailTrim(string name, int procedureTime)
        {
            CheckIfAnimalExist(name);

            nailTrim.DoService(hotel.Animals[name], procedureTime);

            return($"{name} had nail trim procedure");
        }
Exemplo n.º 3
0
        public string NailTrim(string name, int procedureTime)
        {
            DoesAnimalExistInHotel(name);
            var animal = this.hotel.Animals[name];

            trim.DoService(animal, procedureTime);

            return($"{name} had nail trim procedure");
        }
Exemplo n.º 4
0
        public string NailTrim(string name, int procedureTime)
        {
            IAnimal animal = CheckForAnimal(name);

            nailTrim.DoService(animal, procedureTime);
            string result =
                $"{name} had nail trim procedure";

            return(result);
        }
Exemplo n.º 5
0
        public string NailTrim(string name, int procedureTime)
        {
            var animal = GetAnimal(name);

            nailTrimmed.DoService(animal, procedureTime);
            string result = $"{name} had nail trim procedure";

            this.nailTrimmed.ProcedureHistory.Add(animal);
            return(result);
        }
Exemplo n.º 6
0
        public string NailTrim(string name, int procedureTime)
        {
            CheckIfAnimalExists(name);
            IAnimal animal = GetAnimal(name);

            nailTrim.DoService(animal, procedureTime);
            nailTrim.ProcedureHistory.Add(animal);

            return($"{animal.Name} had nail trim procedure");
        }
Exemplo n.º 7
0
        public string NailTrim(string name, int procedureTime)
        {
            if (hotel.Animals.ContainsKey(name) == false)
            {
                throw new ArgumentException($"Animal {name} does not exist");
            }
            IAnimal currentAnimal = hotel.Animals.FirstOrDefault(x => x.Key == name).Value;

            nailTrim.DoService(currentAnimal, procedureTime);
            return($"{currentAnimal.Name} had nail trim procedure");
        }
Exemplo n.º 8
0
        public string NailTrim(string name, int procedureTime)
        {
            var animal = this.hotel
                         .Animals
                         .Values
                         .First(x => x.Name == name);

            nailTrim.DoService(animal, procedureTime);

            return($"{name} had nail trim procedure");
        }
Exemplo n.º 9
0
        public string NailTrim(string name, int procedureTime)
        {
            if (!AnimalExists(name))
            {
                throw new ArgumentException($"Animal {name} does not exist");
            }
            IAnimal currentAnimal = hotel.Animals[name];

            nailTrim.DoService(currentAnimal, procedureTime);
            return($"{name} had nail trim procedure");
        }
Exemplo n.º 10
0
        public string NailTrim(string name, int procedureTime)
        {
            NailTrim nailTrim = new NailTrim();

            var animal = this.hotel.Animals[name];

            nailTrim.DoService(animal, procedureTime);

            this.proceduresAndItsAnimals["NailTrim"].Add(animal);

            return($"{name} had nail trim procedure");
        }
        public string NailTrim(string name, int procedureTime)
        {
            if (!hotel.Animals.ContainsKey(name))
            {
                throw new ArgumentException($"Animal {name} does not exist");
            }
            var animal = hotel.Animals[name];

            nailTrim.DoService(animal, procedureTime);

            return($"{name} had nail trim procedure");
        }
Exemplo n.º 12
0
        public string NailTrim(string name, int procedureTime)
        {
            string nail = "NailTrim";

            CheckAnimalExist(name);
            IAnimal  animal   = GetAnimal(name);
            NailTrim nailTrim = new NailTrim();

            nailTrim.DoService(animal, procedureTime);
            AddHistory(animal, nail);
            return($"{name} had nail trim procedure");
        }
Exemplo n.º 13
0
        public string NailTrim(string name, int procedureTime)
        {
            if (!AnimalExists(name))
            {
                throw new ArgumentException(string.Format(animalDoesntExistErrorMessage, name));
            }

            var animal = this.hotel.Animals.FirstOrDefault(a => a.Key == name).Value;

            nailTrim.DoService(animal, procedureTime);

            return(string.Format(nailTrimProcedure, name));
        }
Exemplo n.º 14
0
        public string NailTrim(string name, int procedureTime)
        {
            IAnimal  animal   = GetAnimal(name, procedureTime);
            NailTrim nailTrim = new NailTrim();

            nailTrim.DoService(animal, procedureTime);

            AddToHistory(nailTrim.GetType().Name, animal);

            string result = $"{animal.Name} had nail trim procedure";

            return(result);
        }
Exemplo n.º 15
0
        public string NailTrim(string name, int procedureTime)
        {
            CheckForAnimal(name);
            NailTrim nailTrim = new NailTrim();
            Animal   animal   = hotel.Animals.Values.FirstOrDefault(x => x.Name == name);

            nailTrim.DoService(animal, procedureTime);
            if (!history.ContainsKey("NailTrim"))
            {
                history.Add("NailTrim", new List <Animal>());
            }
            history["NailTrim"].Add(animal);
            return($"{name} had nail trim procedure");
        }
Exemplo n.º 16
0
        public string NailTrim(string name, int procedureTime)
        {
            if (IsExistInHotel(name))
            {
                throw new ArgumentException($"Animal {name} does not exist");
            }
            Procedure procedure = new NailTrim();

            procedure.DoService(animalsInHotel[name], procedureTime);
            procedures.Add(procedure);
            string result = $"{name} had nail trim procedure";

            return(result);
        }
Exemplo n.º 17
0
        public string NailTrim(string name, int procedureTime)
        {
            if (hotel.Animals.ContainsKey(name) == false)
            {
                throw new ArgumentException($"Animal {name} does not exist");
            }

            var animal = hotel.Animals[name];

            nailTrim.DoService(animal, procedureTime);
            nailTrim.ProcedureHistory.Add(animal);
            this.procedures.Add(nailTrim);

            return($"{name} had nail trim procedure");
        }
Exemplo n.º 18
0
        public string NailTrim(string name, int procedureTime)
        {
            AnimalDoesntExist(name);

            IAnimal animal = TakeAnimal(name);

            IProcedure nailTrim = new NailTrim();

            nailTrim.DoService(animal, procedureTime);

            AddTypeProcedure(nailTrim);

            return(string.Format(
                       ConstantMessages.HadProcedure,
                       animal.Name,
                       "nail trim"));
        }
Exemplo n.º 19
0
        public string NailTrim(string name, int procedureTime)
        {
            this.DoesExist(name);

            var animal = hotel.GetAnimal(name);

            if (this.procedures.Any(p => p.GetType().Name == "NailTrim"))
            {
                this.procedures.First(p => p.GetType().Name == "NailTrim")
                .DoService(animal, procedureTime);
            }
            else
            {
                Procedure procedure = new NailTrim();
                procedure.DoService(animal, procedureTime);
                this.procedures.Add(procedure);
            }

            return($"{name} had nail trim procedure");
        }
Exemplo n.º 20
0
        public string NailTrim(string name, int procedureTime)
        {
            if (!this.hotel.Animals.ContainsKey(name))
            {
                throw new ArgumentException($"Animal {name} does not exist");
            }

            var animal = this.hotel.Animals.First(x => x.Value.Name == name).Value;

            if (this.procedures.Any(x => x.GetType() == typeof(NailTrim)))
            {
                this.procedures.First(x => x.GetType() == typeof(NailTrim)).DoService(animal, procedureTime);
            }

            else
            {
                var nailTrim = new NailTrim();
                nailTrim.DoService(animal, procedureTime);
                this.procedures.Add(nailTrim);
            }

            return($"{animal.Name} had nail trim procedure");
        }