public void Remove_Character_RemovesConfusedAndFlatFooted_NotAlreadyPresent_Test() { var character = CreateMockCharacter(); var confused = new Confused(); confused.Apply(character); confused.Remove(character); Assert.AreEqual(0, character.Conditions.Count); }
public void Remove_Character_FlatFootedAlreadyExists_Test() { var character = CreateMockCharacter(); var existingFlatFooted = new FlatFooted(1, 2, 3); var confused = new Confused(); existingFlatFooted.Apply(character); confused.Apply(character); confused.Remove(character); var flatFooted = (FlatFooted)character.Conditions.FirstOrDefault(c => c.Id == EntityIds.FLAT_FOOTED_CONDITION_ID); Assert.IsNotNull(flatFooted); Assert.AreEqual(EntityIds.FLAT_FOOTED_CONDITION_ID, flatFooted.Id); Assert.AreEqual(3, flatFooted.FlatFootedFrom.Count); Assert.IsTrue(flatFooted.FlatFootedFrom.Contains(1)); Assert.IsTrue(flatFooted.FlatFootedFrom.Contains(2)); Assert.IsTrue(flatFooted.FlatFootedFrom.Contains(3)); }