示例#1
0
        public void Remove_NoConditions_Test()
        {
            var character = CreateMockCharacter();
            var dying     = new Dying(1);

            dying.Apply(character);
            dying.Remove(character);
            Assert.AreEqual(1, character.Conditions.Count);
            var wounded = character.Conditions.FirstOrDefault(c => c.Id == EntityIds.WOUNDED_CONDITION_ID);

            Assert.IsNotNull(wounded);
            Assert.AreEqual(1, wounded.Level);
        }
示例#2
0
        public void Remove_WithExistingWoundedCondition_Test()
        {
            var character = CreateMockCharacter();
            var wounded   = new Wounded(1);

            wounded.Apply(character);
            var dying = new Dying(1);

            dying.Apply(character);
            dying.Remove(character);
            Assert.AreEqual(1, character.Conditions.Count);
            Assert.AreEqual(2, character.Conditions.First(c => c.Id == wounded.Id).Level);
        }