public void Test_IsSkillInList_SkillListParam_BadResult()
        {
            Skill objSkill = new Skill();

            objSkill.GetSkill(3);

            Skill objSkill2 = new Skill();

            objSkill2.GetSkill(4);

            List <Skill> lstSkills = new List <Skill>();

            lstSkills.Add(objSkill);
            lstSkills.Add(objSkill2);

            bool blnFunctionResult;
            int  intCharacterID = 1;

            CharacterSkill        objCharacterSkill  = new CharacterSkill();
            List <CharacterSkill> lstCharacterSkills = new List <CharacterSkill>();

            lstCharacterSkills = objCharacterSkill.GetCharacterSkills(intCharacterID);
            blnFunctionResult  = CharacterSkill.IsSkillInList(lstSkills, lstCharacterSkills);

            Assert.IsFalse(blnFunctionResult);
        }
        private void SetCharacterSkillsGrid(Armor objArmor)
        {
            csc1.ResetControl();
            csc2.ResetControl();
            csc3.ResetControl();
            csc4.ResetControl();
            csc5.ResetControl();
            csc6.ResetControl();
            csc7.ResetControl();

            DisplaySkillsGrid(true);
            Skill        objDummySkill     = new Skill();
            List <Skill> lstArmorProSkills = new List <Skill>();

            lstArmorProSkills = objDummySkill.GetArmorProfSkills();

            foreach (Skill objSkill in lstArmorProSkills)
            {
                Ability objAbility = new Ability(objSkill.AbilityID);
                if (CharacterSkill.IsSkillInList(objSkill, objCharacter.lstCharacterSkills))
                {
                    FillOutCharacterSkillControls(CharacterSkill.GetCharacterSkillFromListBySkill(objSkill, objCharacter.lstCharacterSkills), objArmor.objArmorType.ArmorCheckPenalty);
                }
                else
                {
                    CharacterSkill objCharSkill = new CharacterSkill();
                    //If its trained only fill in blanks else fill in the stats that the char has
                    objCharSkill.CharacterID   = objCharacter.CharacterID;
                    objCharSkill.FeatTalentMod = 0;
                    objCharSkill.Miscellaneous = objArmor.objArmorType.ArmorCheckPenalty;
                    objCharSkill.objSkill      = objSkill;
                    objCharSkill.SkillID       = objSkill.SkillID;
                    objCharSkill.Trained       = 0;
                    objCharSkill.SkillFocus    = 0;

                    if (objSkill.TrainedSkill)
                    {
                        objCharSkill.AbilityMod = 0;
                        objCharSkill.HalfLevel  = 0;
                    }
                    else
                    {
                        objCharSkill.AbilityMod = objCharacter.GetCharacterAbilityModifier(objAbility);
                        objCharSkill.HalfLevel  = objCharacter.CharacterLevelID / 2;
                    }
                    FillOutCharacterSkillControls(objCharSkill, 0);
                }
            }
        }
        public void Test_IsSkillInList_SkillObjParam_GoodResult()
        {
            Skill objSkill = new Skill();

            objSkill.GetSkill(5);

            bool blnFunctionResult;
            int  intCharacterID = 1;

            CharacterSkill        objCharacterSkill  = new CharacterSkill();
            List <CharacterSkill> lstCharacterSkills = new List <CharacterSkill>();

            lstCharacterSkills = objCharacterSkill.GetCharacterSkills(intCharacterID);
            blnFunctionResult  = CharacterSkill.IsSkillInList(objSkill, lstCharacterSkills);

            Assert.IsTrue(blnFunctionResult);
        }