public void potionModel_getType_expected_type_for_default_should_pass() { //Arrange var update = new PotionsModel(); //Act var result = update.GetPotionType(); //Assert Assert.AreEqual(PotionsEnum.Health, result); }
public void potionsModel_expected_default_potion_should_pass() { //Arrange //Act var result = new PotionsModel(); //Assert Assert.AreEqual(10, result.Addition); Assert.AreEqual(PotionsEnum.Health, result.potionType); Assert.AreEqual("Health.png", result.ImageURI); }
/// <summary> /// this is hack number 4 which will give the user 6 /// this will also add two mana potions to the character as well /// </summary> /// <returns></returns> public bool populatePotionsList() { if (RoundHealing == RoundHealingEnum.Healing_on) //if on will add six healing potions { for (int i = 0; i < 6; i++) { //creating a health potion PotionsModel HealthPotion = new PotionsModel(); HealthPotion.Addition = (5 * BattleScore.RoundCount); HealthPotion.potionType = PotionsEnum.Health; HealthPotion.ImageURI = "Health.png"; //adding to the potionsList potionPool.Add(HealthPotion); } } else if (RoundHealing == RoundHealingEnum.Healing_off) { PotionsModel HealthPotion = new PotionsModel(); HealthPotion.Addition = (5 * BattleScore.RoundCount); HealthPotion.potionType = PotionsEnum.Health; HealthPotion.ImageURI = "Health.png"; //only adding one potion potionPool.Add(HealthPotion); } for (int i = 0; i < 2; i++) //defualt is that you will always get two mana potions { //creating a mana potions PotionsModel ManaPotion = new PotionsModel(); ManaPotion.Addition = (5 * BattleScore.RoundCount); ManaPotion.potionType = PotionsEnum.Mana; ManaPotion.ImageURI = "Mana.png"; // adding to the potionList potionPool.Add(ManaPotion); } if (potionPool.Count == 8 && RoundHealing == RoundHealingEnum.Healing_on) { return(true); } else if (RoundHealing == RoundHealingEnum.Healing_on) { return(false); } else if (RoundHealing == RoundHealingEnum.Healing_off && potionPool.Count == 3) { return(true); } return(false); }
public void RoundEngine_populatePotionsList_Healing_On_should_fail() { //Arrange Engine.RoundHealing = RoundHealingEnum.Healing_on; //Act PotionsModel potion = new PotionsModel(); Engine.potionPool.Add(potion); var result = Engine.populatePotionsList(); //Reset //Assert Assert.AreEqual(false, result); }
public void potionModel_testing_update_function_should_pass() { //Arrange PotionsModel origonal = new PotionsModel(); PotionsModel updatePotion = new PotionsModel(); updatePotion.ImageURI = "Mana.png"; updatePotion.potionType = PotionsEnum.Mana; updatePotion.Addition = 5; //Act origonal.Update(updatePotion); //Assert Assert.AreEqual(updatePotion.ImageURI, origonal.ImageURI); Assert.AreEqual(updatePotion.potionType, origonal.potionType); Assert.AreEqual(updatePotion.Addition, origonal.Addition); }