示例#1
0
        public void Apply_NotACharacter_Test()
        {
            var entity     = Mock.Of <IEntity>();
            var unfriendly = new Unfriendly();

            unfriendly.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 unfriendly = new Unfriendly();

            unfriendly.Apply(character);
            unfriendly.Remove(character);
            Assert.AreEqual(0, character.Conditions.Count);
        }
示例#3
0
        public void Apply_Character_WithExistingUnfriendlyCondition_Test()
        {
            var character = CreateMockCharacter();

            character.Conditions.Add(new Unfriendly());
            var unfriendly = new Unfriendly();

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

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