Example #1
0
        public void validateSpecificItem(string id)
        {
            string uriReq = new OmdbUriRequest.OmdbRequestBuilder(OmdbTerms.ID, id)
                            .Build()
                            .ToString();
            string request = ApiServiceManager.GetSpecificValueFromJsonResponse(AvailableApiServices.OMDB, uriReq, "imdbID");

            Assert.IsTrue(request.ToLower().Contains(id.ToLower()));
        }
Example #2
0
        public void ValidateSeriesExists(String title)
        {
            String uriRequest = new OmdbUriRequest.OmdbRequestBuilder(OmdbTerms.TITLE, title)
                                .UsingFormat(OmdbTerms.SERIES)
                                .UsingDatatype(OmdbTerms.JSON_DATATYPE)
                                .WithPlotType(OmdbTerms.FULL_PLOT)
                                .WithPageNumber(1)
                                .Build()
                                .ToString();
            // Make request and get the answer as a JSON string
            string request = ApiServiceManager.GetSpecificValueFromJsonResponse(AvailableApiServices.OMDB, uriRequest, "Title");

            //Make sure the title matches the expected value
            Assert.IsTrue(request.ToLower().Contains(title.ToLower()));
        }