コード例 #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
ファイル: Program.cs プロジェクト: dance2die/MyAnimeListSharp
        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());
        }
コード例 #4
0
 public static string ToJson(this MangaSearchResponse response)
 {
     return(new JsonFormatter <MangaSearchResponse>().Format(response));
 }
コード例 #5
0
 public static string ToXml(this MangaSearchResponse response)
 {
     return(new GenericXmlFormatter <MangaSearchResponse>().Format(response));
 }