Esempio n. 1
0
        public void Can_Get_Tournaments()
        {
            var tournamentService = new PubgTournamentService(Storage.ApiKey);

            var tournaments = tournamentService.GetTournaments();

            Assert.All(tournaments, t => t.Id.Should().NotBeNullOrWhiteSpace());
            Assert.All(tournaments, t => t.Type.Should().NotBeNullOrWhiteSpace());
        }
        public void Can_Get_Tournament_From_List()
        {
            var tournamentService = new PubgTournamentService(Storage.ApiKey);

            var tournaments     = tournamentService.GetTournaments();
            var tournamentToGet = tournaments.FirstOrDefault();

            tournamentToGet.Should().NotBeNull();

            var retrievedTournament = tournamentService.GetTournament(tournamentToGet.Id);

            retrievedTournament.Should().NotBeNull();
            retrievedTournament.Id.Should().NotBeNullOrWhiteSpace();
            retrievedTournament.Type.Should().NotBeNullOrWhiteSpace();
        }