Ejemplo n.º 1
0
        public void Edit_Test()
        {
            //Arrange
            Mon newMon = new Mon("Electrode", 43, 24, 31, 61, 32, 23, 23);

            newMon.Save();
            Mon expectedMon = new Mon("Electrode", 43, 24, 32, 61, 32, 23, 20, newMon.GetMonId());

            //Act
            newMon.Edit("Electrode", 43, 24, 32, 61, 32, 23, 20);

            //Assert
            Assert.AreEqual(expectedMon, newMon);
        }
Ejemplo n.º 2
0
        public void GetAllTrueStats_Test()
        {
            //Arrange
            Mon newMon = new Mon("Rattata", 50, 30, 56, 35, 25, 35, 72);

            newMon.Save();
            Battle expectedResult = new Battle(newMon.GetMonId(), "Rattata", 50, 105, 105, 105, 76, 55, 45, 55, 92);

            //Act

            Battle result = newMon.GetAllTrueStats();

            //Assert
            Assert.AreEqual(expectedResult, result);
        }
Ejemplo n.º 3
0
        public void Find_Test()
        {
            //Arrange
            Mon newMon = new Mon("Snorlax", 4, 2, 4, 3, 5, 6, 22);

            newMon.Save();

            //Act
            Mon result = Mon.Find(newMon.GetMonId());

            //Assert
            Console.WriteLine(result.GetMonName());
            Console.WriteLine(result.GetLevel());
            Console.WriteLine(result.GetHitpoints());
            Console.WriteLine(result.GetAttack());
            Console.WriteLine(result.GetDefense());
            Console.WriteLine(result.GetSpecialattack());
            Console.WriteLine(result.GetSpecialdefense());
            Console.WriteLine(result.GetSpeed());


            Assert.AreEqual(newMon, result);
        }