Exemple #1
0
        public void Apply_NotACharacter_Test()
        {
            var entity  = Mock.Of <IEntity>();
            var hostile = new Hostile();

            hostile.Apply(entity);
            Assert.IsTrue(true); // If we made it here without exception then the test passed
        }
Exemple #2
0
        public void Remove_NoConditions_Test()
        {
            var character = CreateMockCharacter();
            var hostile   = new Hostile();

            hostile.Apply(character);
            hostile.Remove(character);
            Assert.AreEqual(0, character.Conditions.Count);
        }
Exemple #3
0
        public void Apply_Character_WithExistingHostileCondition_Test()
        {
            var character = CreateMockCharacter();

            character.Conditions.Add(new Hostile());
            var hostile = new Hostile();

            hostile.Apply(character);
        }
Exemple #4
0
        public void Apply_Character_NoConditions_Test()
        {
            var character = CreateMockCharacter();
            var hostile   = new Hostile();

            hostile.Apply(character);
            Assert.AreEqual(EntityIds.HOSTILE_CONDITION_ID, character.Conditions[0].Id);
            Assert.AreSame(hostile, character.Conditions[0]);
            Assert.AreEqual(ConditionGroup.Attitude, character.Conditions[0].Group);
        }