public void TestGetGameweekNumber()
        {
            var api = new FantasyPremierLeagueApi(TestConstants.USERNAME, TestConstants.PASSWORD, _logger);

            var number = api.GetGameweekNumber();

            _logger.WriteInfoMessage("Current gameweek number is: " + number);
        }
Ejemplo n.º 2
0
        public void TestGetGameweekNumber()
        {
            var api = new FantasyPremierLeagueApi(TestConstants.USERNAME, TestConstants.PASSWORD, _logger);

            var number = api.GetGameweekNumber();

            _logger.WriteInfoMessage("Current gameweek number is: " + number);
        }
        public void TestGetAllPlayers()
        {
            var api = new FantasyPremierLeagueApi(TestConstants.USERNAME, TestConstants.PASSWORD, _logger);

            var allPlayers = api.GetAllPlayers();

            _logger.WriteInfoMessage("All player stats: " +
                    JsonConvert.SerializeObject(allPlayers));

            // test serialize
            var formatter = new BinaryFormatter();
            using (var fs = new MemoryStream())
            {
                formatter.Serialize(fs, allPlayers);
            }
        }
Ejemplo n.º 4
0
        public void TestGetRemainingBudget()
        {
            var api = new FantasyPremierLeagueApi(TestConstants.USERNAME, TestConstants.PASSWORD, _logger);

            var remainingBudget = api.GetRemainingBudget();

            _logger.WriteInfoMessage("Remaining budget: " + remainingBudget);

            // test serialize
            var formatter = new BinaryFormatter();

            using (var fs = new MemoryStream())
            {
                formatter.Serialize(fs, remainingBudget);
            }
        }
Ejemplo n.º 5
0
        public void TestGetPlayer()
        {
            var api = new FantasyPremierLeagueApi(TestConstants.USERNAME, TestConstants.PASSWORD, _logger);

            var player = api.GetPlayer(23);

            _logger.WriteInfoMessage("Player 23 stats: " + JsonConvert.SerializeObject(player));

            // test serialize
            var formatter = new BinaryFormatter();

            using (var fs = new MemoryStream())
            {
                formatter.Serialize(fs, player);
            }
        }
        public void TestGetClubSeasonPerformances()
        {
            var api = new FantasyPremierLeagueApi(TestConstants.USERNAME, TestConstants.PASSWORD, _logger);

            var lastSeason = api.GetClubSeasonPerformances("2014-2015");
            var thisSeason = api.GetClubSeasonPerformances("2013-2014");

            _logger.WriteInfoMessage("Last season's league performance by club: " +
                    JsonConvert.SerializeObject(lastSeason));

            _logger.WriteInfoMessage("This season's league performance by club: " +
                    JsonConvert.SerializeObject(thisSeason));

            // test serialize
            var formatter = new BinaryFormatter();
            using (var fs = new MemoryStream())
            {
                formatter.Serialize(fs, thisSeason);
            }
        }
Ejemplo n.º 7
0
        public void TestGetClubSeasonPerformances()
        {
            var api = new FantasyPremierLeagueApi(TestConstants.USERNAME, TestConstants.PASSWORD, _logger);

            var lastSeason = api.GetClubSeasonPerformances("2014-2015");
            var thisSeason = api.GetClubSeasonPerformances("2013-2014");

            _logger.WriteInfoMessage("Last season's league performance by club: " +
                                     JsonConvert.SerializeObject(lastSeason));

            _logger.WriteInfoMessage("This season's league performance by club: " +
                                     JsonConvert.SerializeObject(thisSeason));

            // test serialize
            var formatter = new BinaryFormatter();

            using (var fs = new MemoryStream())
            {
                formatter.Serialize(fs, thisSeason);
            }
        }
        public void TestGetRemainingBudget()
        {
            var api = new FantasyPremierLeagueApi(TestConstants.USERNAME, TestConstants.PASSWORD, _logger);

            var remainingBudget = api.GetRemainingBudget();

            _logger.WriteInfoMessage("Remaining budget: " + remainingBudget);

            // test serialize
            var formatter = new BinaryFormatter();
            using (var fs = new MemoryStream())
            {
                formatter.Serialize(fs, remainingBudget);
            }
        }