public void GetFullWeightOfFood_Add2Animals_GetWeight() { int firstWeight = 50; int secondWeight = 100; Case _case = Case.GetInstance(); _case.CleanCase(); _case.AddAnimal(new Ghoul(firstWeight, "ghoul")); _case.AddAnimal(new Occamy(secondWeight, "occamy")); Assert.AreEqual(_case.GetFullWeightOfFood(), firstWeight + secondWeight); }
public void GetAllVoices_Add2Animals_GetVoices() { string voiceGhoul = "i'm ghoul"; string voiceOccamy = "i'm occamy"; string expected = voiceGhoul + "\n" + voiceOccamy + "\n"; Case _case = Case.GetInstance(); _case.CleanCase(); _case.AddAnimal(new Ghoul(50, "ghoul")); _case.AddAnimal(new Occamy(100, "occamy")); Assert.AreEqual(expected, _case.GetAllVoices()); }
public void GetAverageWeightOfFood_Add2Animals_GetWeight() { int firstWeight = 50; int secondWeight = 100; float expected = (firstWeight + secondWeight) / 2; Case _case = Case.GetInstance(); _case.CleanCase(); _case.AddAnimal(new Ghoul(firstWeight, "ghoul")); _case.AddAnimal(new Occamy(secondWeight, "occamy")); Assert.AreEqual(expected, _case.GetAverageWeightOfFood()); }