示例#1
0
        public async void SearchDeserializedAsyncResponseHasNoEntry(string searchTerm)
        {
            MangaSearchResponse response = await _sut.SearchDeserializedAsync(searchTerm);

            _output.WriteLine($"response.Entries.Count = {response.Entries.Count}");
            Assert.True(response.Entries.Count == 0);
        }
示例#2
0
        public void ValidMangaResponseStringIsDeserializedAsMangaSearchResponseObjectInstance(string responseString)
        {
            var sut = _mangaSearchResponseDeserializerFixture.Deserializer;

            MangaSearchResponse response = sut.Deserialize(responseString);

            Assert.IsType <MangaSearchResponse>(response);
        }
示例#3
0
        private static async void TestSearchMangaAsync(ICredentialContext credential)
        {
            var asyncMangaSearcher       = new MangaSearchMethodsAsync(credential);
            MangaSearchResponse response = await asyncMangaSearcher.SearchDeserializedAsync("Dagashi Kashi");

            Console.WriteLine(response.ToJson());
            Console.WriteLine(response.ToXml());
        }
 public static string ToJson(this MangaSearchResponse response)
 {
     return(new JsonFormatter <MangaSearchResponse>().Format(response));
 }
 public static string ToXml(this MangaSearchResponse response)
 {
     return(new GenericXmlFormatter <MangaSearchResponse>().Format(response));
 }