Beispiel #1
0
        public void TesteBuscarDadosJogosSerie()
        {
            IgdbService              igdb       = new IgdbService();
            DadosGameResponse        response   = igdb.DadosJogo(20044).FirstOrDefault();
            List <DadosGameResponse> listaGames = new List <DadosGameResponse>();

            if (response.Cover == null)
            {
                DadosGameSeriesResponse resposta = igdb.BuscaGameSeries(response.Collection).FirstOrDefault();
                foreach (int game in resposta.Games)
                {
                    DadosGameResponse dados = igdb.DadosJogo(game).FirstOrDefault();
                    if (igdb.ValidarGamePlataforma(dados))
                    {
                        listaGames.Add(igdb.DadosJogo(game).FirstOrDefault());
                    }
                }
            }
            Assert.IsNotNull(listaGames);
            Assert.IsNotNull(response.Collection);
        }