示例#1
0
        public void Apply_ApplyWhenValueZero_ThrowsException()
        {
            var character = CreateMockCharacter();
            var sickened  = new Sickened(0);

            sickened.Apply(character);
            Assert.AreEqual(0, character.Conditions.Count);
        }
示例#2
0
        public void Apply_NotACharacter_Test()
        {
            var entity   = Mock.Of <IEntity>();
            var sickened = new Sickened(1);

            sickened.Apply(entity);
            Assert.IsTrue(true); // If we made it here with exception then the test passed
        }
示例#3
0
        public void Apply_Character_WithExistingSickenedCondition_ThrowsException_Test()
        {
            var character = CreateMockCharacter();

            character.Conditions.Add(new Sickened(1));
            var sickened = new Sickened(2);

            sickened.Apply(character);
        }
示例#4
0
        public void Apply_Character_NoConditions_Test()
        {
            var character = CreateMockCharacter();
            var sickened  = new Sickened(1);

            sickened.Apply(character);
            Assert.AreEqual(EntityIds.SICKENED_CONDITION_ID, character.Conditions[0].Id);
            Assert.AreEqual(ModifierType.Status, character.Conditions[0].Modifier.Type);
            Assert.AreEqual(-1, character.Conditions[0].Modifier.Value);
            Assert.AreSame(sickened, character.Conditions[0]);
        }