Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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());
        }
Exemplo n.º 3
0
        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());
        }