Exemple #1
0
 public void Apply_Character_WithExistingGrabbedCondition_Test()
 {
     var character = CreateMockCharacter();
     character.Conditions.Add(new Grabbed());
     var grabbed = new Grabbed();
     grabbed.Apply(character);
 }
Exemple #2
0
 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
 }
Exemple #3
0
 public void Remove_NoConditions_Test()
 {
     var character = CreateMockCharacter();
     var grabbed = new Grabbed();
     grabbed.Apply(character);
     grabbed.Remove(character);
     Assert.AreEqual(0, character.Conditions.Count);
 }
Exemple #4
0
 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));
 }
Exemple #5
0
        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));
        }