Пример #1
0
        public void PullFranchisesTest()
        {
            Franchises test = new Franchises();

            test = dao.PullSpecificFranchise(101);
            Assert.AreEqual(101, test.Franchise_Id);
            Assert.AreEqual("Coder Legacy", test.Franchise_Name);
        }
        public IList <DisplayResults> GetUserList(string username)
        {
            IList <DisplayResults> getUserGames = new List <DisplayResults>();

            IList <UserGameInfo> userGame = new List <UserGameInfo>();

            userGame = userGameInfoSQLDAO.PullUserGameInfo(username);

            foreach (UserGameInfo x in userGame)
            {
                DisplayResults newGameResult = new DisplayResults();
                newGameResult.UserGameInfo = x;
                newGameResult.GameInfo     = gameInfoSQLDAO.PullGameByID(x.Game_Id);
                newGameResult.Rating       = gameRatingSQLDAO.PullGameRating(newGameResult.GameInfo.ratingId);
                newGameResult.Franchise    = franchiseSQLDAO.PullSpecificFranchise(newGameResult.GameInfo.franchiseID);
                newGameResult.Genre        = genresSQLDAO.PullGenreList(newGameResult.GameInfo.genreID);
                newGameResult.Platform     = platformsSQLDAO.PullPlatformList(newGameResult.GameInfo.platformID);

                getUserGames.Add(newGameResult);
            }



            return(getUserGames);
        }
        public void FranchiseAddToSQLTest()
        {
            IList <GameInfo> testList = new List <GameInfo>();

            testList = mediator.GetGames("Halo", false);
            mediator.PushFranchiseIntoSQL(testList);
            Franchises test = new Franchises();

            test = daoFranchises.PullSpecificFranchise(137);
            Assert.AreEqual(137, test.Franchise_Id);
            Assert.AreEqual("Halo", test.Franchise_Name);
        }