public void Apply_Character_WithExistingGrabbedCondition_Test() { var character = CreateMockCharacter(); character.Conditions.Add(new Grabbed()); var grabbed = new Grabbed(); grabbed.Apply(character); }
public void Apply_NotACharacter_Test() { var entity = Mock.Of<IEntity>(); var grabbed = new Grabbed(); grabbed.Apply(entity); Assert.IsTrue(true); // If we made it here without exception then the test passed }
public void Remove_NoConditions_Test() { var character = CreateMockCharacter(); var grabbed = new Grabbed(); grabbed.Apply(character); grabbed.Remove(character); Assert.AreEqual(0, character.Conditions.Count); }
public void Apply_Character_NoConditions_Test() { var character = CreateMockCharacter(); var grabbed = new Grabbed(); grabbed.Apply(character); Assert.IsTrue(character.Conditions.Contains(grabbed)); Assert.IsTrue(character.Conditions.Any(c => c.Id == EntityIds.FLAT_FOOTED_CONDITION_ID)); Assert.IsTrue(character.Conditions.Any(c => c.Id == EntityIds.IMMOBILIZED_CONDITION_ID)); }
public void Apply_Character_GrabConditionRemoval_Test() { var character = CreateMockCharacter(); var grabbed = new Grabbed(); grabbed.Apply(character); var restrained = new Restrained(); restrained.Apply(character); Assert.IsFalse(character.Conditions.Any(c => c.Id == EntityIds.GRABBED_CONDITION_ID)); Assert.IsTrue(character.Conditions.Any(c => c.Id == EntityIds.RESTRAINED_CONDITION_ID)); Assert.IsTrue(character.Conditions.Any(c => c.Id == EntityIds.FLAT_FOOTED_CONDITION_ID)); Assert.IsTrue(character.Conditions.Any(c => c.Id == EntityIds.IMMOBILIZED_CONDITION_ID)); }