Beispiel #1
0
        public void GetEntryAsync_ParseIsBad_Exception()
        {
            var parser = new Parser <ComicModel>();
            var comicsRequestController = new HttpController <ComicModel>(Client.ApiClient, parser);

            Task <ComicModel> result = comicsRequestController.GetEntryAsync("application/json", "Get", "search?name=middle", optionalParameters, new System.Threading.CancellationToken());

            Assert.That(() => result, Throws.TypeOf <FailedToParseResponseDataExcpetion>());
        }
Beispiel #2
0
        public void GetEntryAsync_PayloadIsNull_Exception()
        {
            Task <List <UniversityModel> > result = universityRequestController.GetEntryAsync(null, "Get", "search?", optionalParameters, new System.Threading.CancellationToken());

            Assert.That(() => result, Throws.TypeOf <HttpRequestException>());
        }