public void TestCure() { Character character = CreateCharacter(); int initialHealthCharacter = character.Health; int healthCalc = character.Health - 900; int healthExpected = healthCalc < 0 ? 0 : healthCalc; Character characterEnemy = CreateCharacter(); int initialHealthCharacterEnemy = character.Health; int healthCalcEnemy = characterEnemy.Health - 900; int healthExpectedEnemy = healthCalcEnemy < 0 ? 0 : healthCalc; Iteration2 iteration2 = new Iteration2(character, characterEnemy); iteration2.Damage(900); initialHealthCharacterEnemy = characterEnemy.Health; Assert.AreEqual(initialHealthCharacter, character.Health, "No damage"); Assert.AreEqual(healthExpectedEnemy, characterEnemy.Health, "Damagem done"); Iteration2 iteration2Inverse = new Iteration2(characterEnemy, character); iteration2Inverse.Damage(900); initialHealthCharacter = character.Health; Assert.AreEqual(initialHealthCharacterEnemy, characterEnemy.Health, "No damage"); Assert.AreEqual(healthExpected, character.Health, "Damagem done"); iteration2.Cure(900); Assert.AreEqual(character.MaxHealth, character.Health, "Cure done"); iteration2Inverse.Cure(900); Assert.AreEqual(characterEnemy.MaxHealth, characterEnemy.Health, "Cure done"); }
public void TestReducedDamage() { Character character = CreateCharacter(); Character characterEnemy = CreateCharacter(); characterEnemy.Level += 5; Iteration2 iteration2 = new Iteration2(character, characterEnemy); iteration2.Damage(100); Assert.AreEqual(characterEnemy.MaxHealth - 50, characterEnemy.Health, "Reduced damage"); }
public void TestOwnDamage() { Character character = CreateCharacter(); int initialHealthCharacter = character.Health; Character characterEnemy = CreateCharacter(); int healthCalc = characterEnemy.Health - 900; int healthExpected = healthCalc < 0 ? 0 : healthCalc; Iteration2 iteration2 = new Iteration2(character, characterEnemy); iteration2.Damage(900); Assert.AreEqual(initialHealthCharacter, character.Health, "No damage"); Assert.AreEqual(healthExpected, characterEnemy.Health, "Damagem done"); }
partial void DeleteIngredient(Iteration2.Entities.Ingredient instance);
partial void InsertIngredient(Iteration2.Entities.Ingredient instance);
partial void DeleteIngredientsRecipesRelation(Iteration2.Entities.IngredientsRecipesRelation instance);
partial void InsertIngredientsRecipesRelation(Iteration2.Entities.IngredientsRecipesRelation instance);
partial void DeleteRecipe(Iteration2.Entities.Recipe instance);
partial void InsertRecipe(Iteration2.Entities.Recipe instance);