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); }
public void ValidMangaResponseStringIsDeserializedAsMangaSearchResponseObjectInstance(string responseString) { var sut = _mangaSearchResponseDeserializerFixture.Deserializer; MangaSearchResponse response = sut.Deserialize(responseString); Assert.IsType <MangaSearchResponse>(response); }
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)); }