Exemple #1
0
        public void TestGetSeasonMatches()
        {
            string expectedSeasonRequests = EmbeddedData.AsString("seasonMatches-seriea-2016-2017.txt");
            var    expectedJson           = JArray.Parse(expectedSeasonRequests);

            var testSeasonRequest = new SeasonRequest
            {
                League = "Serie A",
                Years  = "2016/2017"
            };

            string actualSeasonRequests = _controller.GetSeasonMatches(testSeasonRequest);
            var    actualJson           = JArray.Parse(actualSeasonRequests);

            Assert.AreEqual(expectedJson.ToString(), actualJson.ToString());
        }
Exemple #2
0
        public void TestGetMatchDetails()
        {
            string expectedMatchDetails = EmbeddedData.AsString("matchDetails.txt");
            var    expectedJson         = JObject.Parse(expectedMatchDetails);

            var testMatchRequest = new MatchRequest
            {
                HomeTeamId = 75,
                Date       = "30-10-16"
            };

            string actualMatchDetails = _controller.GetMatchDetails(testMatchRequest);
            var    actualJson         = JObject.Parse(actualMatchDetails);

            Assert.AreEqual(expectedJson.ToString(), actualJson.ToString());
        }