//[Test] public void RoundEngine_Monsters_Buffed_Ten_Should_Return_True() { //Arrange Engine.BattleScore.RoundCount = 101; Engine.MonsterList.Clear(); var Monster = new BaseMonster { Speed = 10, CurrHealth = 10, MaxHealth = 10, Attack = 10, Defense = 10, Name = "A", }; var MonsterPlayer = new PlayerInfoModel(Monster); Engine.MonsterList.Add(MonsterPlayer); Engine.MaxNumberPartyMonsters = 1; //Act Engine.AddMonstersToRound(); var result = Engine.MonsterList; //Reset Engine.EndRound(); //Assert Assert.AreEqual(true, result[0].Attack == 100); }
public void HakathonScenario_31_Monster_Multiplied_Should_Pass() { /* * Scenario Number: * #31 * * Description: * Every round past 100 the monsters stats are multiplied by 10 * * Changes Required (Classes, Methods etc.) List Files, Methods, and Describe Changes: * RoundEngine.cs * AddMonstersToRound() * * Test Algrorithm: * set the roundcount to 101 in the scoremodel held by BattleEngine * Add Monsters to round with base stats of 10 * Validate the stats are now 100 * * Test Conditions: * Round Count >100 * * * Validation: * Validate the stats of the monster added are all 100 */ //Arrange Engine.BattleScore.RoundCount = 101; var saveList = Engine.MonsterList; Engine.MonsterList.Clear(); var Monster = new BaseMonster { Speed = 10, CurrHealth = 10, MaxHealth = 10, Attack = 10, Defense = 10, Name = "A", }; var MonsterPlayer = new PlayerInfoModel(Monster); Engine.MonsterList.Add(MonsterPlayer); Engine.MaxNumberPartyMonsters = 1; //Act Engine.AddMonstersToRound(); var result = Engine.MonsterList; //Reset Engine.EndRound(); Engine.MonsterList = saveList; Engine.BattleScore.RoundCount = 0; bool All_Equals_100 = true; foreach (PlayerInfoModel monster in result) { if (monster.Attack != 100 || monster.Defense != 100 || monster.Speed != 100 || monster.CurrHealth != 100 || monster.MaxHealth != 100) { All_Equals_100 = false; } } //Assert Assert.AreEqual(true, All_Equals_100); }