public void Remove_Character_Test() { var character = CreateMockCharacter(); var flatFooted = new FlatFooted(1, 2, 3); flatFooted.Apply(character); flatFooted.Remove(character); Assert.AreEqual(0, character.Conditions.Count); }
public void Constructor_Remove_MultipleFlatFootedTo_Test() { var character = CreateMockCharacter(); var flatFooted = new FlatFooted(1, 2, 3); flatFooted.Apply(character); var flatFootedReplacement = new FlatFooted(flatFooted, true, 1, 3); flatFooted.Remove(character); flatFootedReplacement.Apply(character); Assert.AreEqual(1, character.Conditions.Count); Assert.AreEqual(1, ((FlatFooted)character.Conditions[0]).FlatFootedFrom.Count); Assert.IsTrue(((FlatFooted)character.Conditions[0]).FlatFootedFrom.Contains(2)); }
public void Construct_AddSingleFlatFootedTo_Test() { var character = CreateMockCharacter(); var flatFooted = new FlatFooted(1, 2, 3); flatFooted.Apply(character); var flatFootedReplacement = new FlatFooted(flatFooted, false, 4); flatFooted.Remove(character); flatFootedReplacement.Apply(character); Assert.AreEqual(1, character.Conditions.Count); Assert.AreEqual(4, ((FlatFooted)character.Conditions[0]).FlatFootedFrom.Count); Assert.IsTrue(((FlatFooted)character.Conditions[0]).FlatFootedFrom.Contains(1)); Assert.IsTrue(((FlatFooted)character.Conditions[0]).FlatFootedFrom.Contains(2)); Assert.IsTrue(((FlatFooted)character.Conditions[0]).FlatFootedFrom.Contains(3)); Assert.IsTrue(((FlatFooted)character.Conditions[0]).FlatFootedFrom.Contains(4)); }