예제 #1
0
 private void OnIndifferent()
 {
     if (Indifferent != null)
     {
         Indifferent.Invoke();
     }
 }
예제 #2
0
        public void Apply_NotACharacter_Test()
        {
            var entity      = Mock.Of <IEntity>();
            var indifferent = new Indifferent();

            indifferent.Apply(entity);
            Assert.IsTrue(true); // If we made it here without exception then the test passed
        }
예제 #3
0
        public void Remove_NoConditions_Test()
        {
            var character   = CreateMockCharacter();
            var indifferent = new Indifferent();

            indifferent.Apply(character);
            indifferent.Remove(character);
            Assert.AreEqual(0, character.Conditions.Count);
        }
예제 #4
0
        public void Apply_Character_WithExistingIndifferentCondition_Test()
        {
            var character = CreateMockCharacter();

            character.Conditions.Add(new Indifferent());
            var indifferent = new Indifferent();

            indifferent.Apply(character);
        }
예제 #5
0
        public void Apply_Character_NoConditions_Test()
        {
            var character   = CreateMockCharacter();
            var indifferent = new Indifferent();

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