Example #1
0
        public void Apply_NotACharacter_Test()
        {
            var entity   = Mock.Of <IEntity>();
            var fatigued = new Fatigued();

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

            fatigued.Apply(character);
            fatigued.Remove(character);
            Assert.AreEqual(0, character.Conditions.Count);
        }
Example #3
0
        public void Apply_Character_WithExistingFatiguedCondition_Test()
        {
            var character = CreateMockCharacter();

            character.Conditions.Add(new Fatigued());
            var fatigued = new Fatigued();

            fatigued.Apply(character);
        }
Example #4
0
        public void Apply_Character_NoConditions_Test()
        {
            var character = CreateMockCharacter();
            var fatigued  = new Fatigued();

            fatigued.Apply(character);
            Assert.AreEqual(EntityIds.FATIGUED_CONDITION_ID, character.Conditions[0].Id);
            Assert.AreSame(fatigued, character.Conditions[0]);
            Assert.AreEqual(ModifierType.Status, character.Conditions[0].Modifier.Type);
            Assert.AreEqual(-1, character.Conditions[0].Modifier.Value);
            Assert.IsTrue(character.Conditions[0].AppliesTo.Contains(EntityIds.AC_ID));
            Assert.IsTrue(character.Conditions[0].AppliesTo.Contains(EntityIds.FORT_SAVE_ID));
            Assert.IsTrue(character.Conditions[0].AppliesTo.Contains(EntityIds.REFLEX_SAVE_ID));
            Assert.IsTrue(character.Conditions[0].AppliesTo.Contains(EntityIds.WILL_SAVE_ID));
        }