public void Character_Cannot_Deal_Damage_To_Itself() { // Arrange var character = _testsFixture.GenerateRangedGighter(); //Act & Assert Assert.Throws <Exception>(() => character.DealDamage(character, 50)); }
public void Newly_Created_Characters_Belong_To_No_Faction() { // Arrange && Act var character = _testsFixture.GenerateRangedGighter(); // Assert Assert.Empty(character.GetFactions()); }
public void Characters_Can_Damage_Non_Character_Things_Props(double health) { // Arrange var character = _testsFixture.GenerateRangedGighter(); var tree = _testsFixture.GenerateTree(health); // Act character.DealDamage(tree, 1); // Assert Assert.Equal(health - 1, tree.Health); Assert.False(tree.Destroyed); }
public void RangedGighter_Created_Health_Equals_1000() { // Arrange e Act var rangedGighter = _testsFixture.GenerateRangedGighter(); // Assert Assert.Equal(1000, rangedGighter.Health); }
public void Characters_Must_Be_In_Range_To_Deal_Damage_To_A_Target(double damage) { // Arrange var attacker = _testsFixture.GenerateRangedGighter(); var target = _testsFixture.GenerateMeleeFighter(); // Act _testsFixture.Run(3, target); var targetHealthBeforeDamage = target.Health; attacker.DealDamage(target, damage); // Assert Assert.Equal(targetHealthBeforeDamage - damage, target.Health); }