예제 #1
0
        public void Should_DeserializeScoreboardJson_ForValidInput()
        {
            //arrange
            string json = JsonScoreboardResponseConstants.VALID_SCOREBOARD_JSON;
            IJsonSerializationProvider jsonSerializationProvider = new JsonSerializationProvider();

            //act
            LeagueScoreboard deserializedScoreboard = jsonSerializationProvider.DeserializeJson <LeagueScoreboard>(json);

            //assert
            deserializedScoreboard.Should().BeEquivalentTo(CSharpScoreboardTestCaseConstants.SCOREBOARD_OUTPUT_OBJECT);
        }
예제 #2
0
        public async Task Should_GetScoreboardAsync_ForValidInput()
        {
            //arrange
            int leagueId = 526113;
            int year     = 2018;
            EspnFantasyFootballClient espnFantasyFootballClient = new EspnFantasyFootballClient();

            //act
            LeagueScoreboard leagueScoreboard = await espnFantasyFootballClient.GetScoreboardAsync(leagueId, year);

            //assert
            leagueScoreboard.Should().NotBeNull();
        }