public void CalcularAlimentoMensualSoloHerviboros() { _animales.AddRange(MockFactoryHerivboros()); var result = _animales.Sum(a => ZoologicoServicio.CalcularAlimentoMensualHierbas(a)); Assert.AreEqual(result, 5550); }
public void CalcularAlimentoMensualSoloCarnivoros() { _animales.AddRange(MockFactoryCarnivoros()); var result = _animales.Sum(a => ZoologicoServicio.CalcularAlimentoMensualCarne(a)); Assert.AreEqual(result, 675); }
public void Setup() { reptilServicio = new ReptilServicio(); carnivoroServicio = new CarnivoroServicio(); herbivoroServicio = new HerbivoroServicio(); animalStorage = new AnimalStorage(); zoologicoServicio = new ZoologicoServicio(carnivoroServicio, herbivoroServicio, reptilServicio, animalStorage); }
public void CalcularAlimentoReptilHierbas() { _animales.AddRange(MockFactoryReptiles()); var result = _animales.Sum(a => ZoologicoServicio.CalcularAlimentoReptilCarne(a) + ZoologicoServicio.CalcularAlimentoReptilHierbas(a)); Assert.AreEqual(result, 99.5d); }
public void CalcularAlimentoSinAnimales() { var result = _animales.Sum(a => ZoologicoServicio.CalcularAlimentoCarnivoro(a) + ZoologicoServicio.CalcularAlimentoHerviboro(a) + ZoologicoServicio.CalcularAlimentoReptilCarne(a) + ZoologicoServicio.CalcularAlimentoReptilHierbas(a)); Assert.AreEqual(result, 0); }
public void CalcularAlimentoTodos() { _animales.AddRange(MockFactoryTodos()); var result = _animales.Sum(a => ZoologicoServicio.CalcularAlimentoCarnivoro(a) + ZoologicoServicio.CalcularAlimentoHerviboro(a) + ZoologicoServicio.CalcularAlimentoReptilCarne(a) + ZoologicoServicio.CalcularAlimentoReptilHierbas(a)); Assert.AreEqual(result, 307); }
public void Setup() { _animales = new List <Animal>(); _zoologicoServicio = new ZoologicoServicio(); }