Пример #1
0
        public void Apply_NotACharacter_Test()
        {
            var entity   = Mock.Of <IEntity>();
            var observed = new Observed();

            observed.Apply(entity);
            Assert.IsTrue(true); // If we made it here without exception then the test passed
        }
Пример #2
0
        public void Remove_NoConditions_Test()
        {
            var character = CreateMockCharacter();
            var observed  = new Observed();

            observed.Apply(character);
            observed.Remove(character);
            Assert.AreEqual(0, character.Conditions.Count);
        }
Пример #3
0
        public void Apply_Character_WithExistingObservedCondition_Test()
        {
            var character = CreateMockCharacter();

            character.Conditions.Add(new Observed());
            var observed = new Observed();

            observed.Apply(character);
        }
Пример #4
0
        public void Apply_Character_NoConditions_Test()
        {
            var character = CreateMockCharacter();
            var observed  = new Observed();

            observed.Apply(character);
            Assert.AreEqual(EntityIds.OBSERVED_CONDITION_ID, character.Conditions[0].Id);
            Assert.AreSame(observed, character.Conditions[0]);
            Assert.AreEqual(ConditionGroup.DegreesOfDetection, character.Conditions[0].Group);
        }