public void Apply_NotACharacter_Test() { var entity = Mock.Of <IEntity>(); var die = new Die("Acid", 1, 4, 1); var persistentDamage = new PersistentDamage(die.Type, die); persistentDamage.Apply(entity); Assert.IsTrue(true); // If we made it here without exception then the test passed }
public void EndTurn_OneDamageType_ThreeDice_Test() { var character = CreateMockCharacter(); var die = new Die("Acid", 3, 1, 1); var persistentDamage = new PersistentDamage(die.Type, die); persistentDamage.Apply(character); persistentDamage.EndTurn(); Assert.AreEqual(16, character.HitPoints.Current); }
public void Remove_NoConditions_Test() { var character = CreateMockCharacter(); var die = new Die("Acid", 1, 4, 1); var persistentDamage = new PersistentDamage(die.Type, die); persistentDamage.Apply(character); persistentDamage.Remove(character); Assert.AreEqual(0, character.Conditions.Count); }
public void Apply_Character_NoConditions_Test() { var character = CreateMockCharacter(); var die = new Die("Acid", 1, 4, 1); var persistentDamage = new PersistentDamage(die.Type, die); persistentDamage.Apply(character); Assert.AreEqual(EntityIds.PERSISTENT_DAMAGE_CONDITION_ID, character.Conditions[0].Id); Assert.AreSame(persistentDamage, character.Conditions[0]); }
public void Apply_Character_WithSameExistingPersistentDamageCondition_Test() { var character = CreateMockCharacter(); var die = new Die("Acid", 1, 4, 1); character.Conditions.Add(new PersistentDamage(die.Type, die)); var die2 = new Die("Acid", 1, 6, 1); var persistentDamage = new PersistentDamage(die2.Type, die2); persistentDamage.Apply(character);; }
public void Apply_Character_WithExistingPersistentDamageCondition_Test() { var character = CreateMockCharacter(); var die = new Die("Acid", 1, 4, 1); character.Conditions.Add(new PersistentDamage(die.Type, die)); var die2 = new Die("Fire", 1, 4, 1); var persistentDamage = new PersistentDamage(die2.Type, die2); persistentDamage.Apply(character); Assert.AreEqual(2, character.Conditions.Count); }
public void EndTurn_TwoDamageTypes_OneDieEach_Test() { var character = CreateMockCharacter(); var die = new Die("Acid", 1, 1, 1); var acidDamage = new PersistentDamage(die.Type, die); acidDamage.Apply(character); acidDamage.EndTurn(); var die2 = new Die("Fire", 1, 1, 1); var fireDamage = new PersistentDamage(die2.Type, die2); fireDamage.Apply(character); fireDamage.EndTurn(); Assert.AreEqual(16, character.HitPoints.Current); }