Esempio n. 1
0
        public void Test_GetCharacterPrestigeRequirement_ByCharacterID_GoodResult()
        {
            int  CharacterID = 1;
            bool returnVal   = false;
            PrestigeRequirement        objPrestigeRequirement = new PrestigeRequirement();
            List <PrestigeRequirement> lstPR = new List <PrestigeRequirement>();

            PrestigeRequirement objPR = new PrestigeRequirement();

            //Have to add a prestige requirement to the table for testing
            objPR.GetPrestigeRequirement(2);

            PrestigeRequirement objPR2 = new PrestigeRequirement();

            objPR2.SaveCharacterPrestigeRequirement(objPR.PrestigeRequirementID, CharacterID);

            //Now retrive it
            lstPR = objPrestigeRequirement.GetCharacterPrestigeRequirement(CharacterID);

            //Delete the test requirement
            returnVal = objNewPrestigeRequirement.DeleteCharacterPrestigeRequirement(objPR2.PrestigeRequirementID, CharacterID);

            //Test the Asserts
            Assert.IsTrue(lstPR.Count > 0 && returnVal == true);
        }
Esempio n. 2
0
        public void Test_SaveAndDeleteCharacterPrestigeRequirement()
        {
            bool returnVal;
            int  characterID           = 1;
            PrestigeRequirement objPR  = new PrestigeRequirement();
            PrestigeRequirement objPR2 = new PrestigeRequirement();

            objPR.GetPrestigeRequirement(2);

            objPR2.SaveCharacterPrestigeRequirement(objPR.PrestigeRequirementID, characterID);

            List <PrestigeRequirement> lstPR = new List <PrestigeRequirement>();

            lstPR = objPR.GetCharacterPrestigeRequirement(1);

            Assert.IsTrue(lstPR.Count > 0);

            returnVal = objNewPrestigeRequirement.DeleteCharacterPrestigeRequirement(objPR2.PrestigeRequirementID, characterID);

            Assert.IsTrue(returnVal && objNewPrestigeRequirement.DeleteOK);
        }