public async Task <ResponseMain <Dictionary <string, CryptoCurrencyInfoData> > > GetMetaData(string[] idOrSymbol)
 {
     return(QueryStringService.IsIdOrString(idOrSymbol) == "Id"
         ? await GetAsync <ResponseMain <Dictionary <string, CryptoCurrencyInfoData> > >(
                CryptoCurrencyApiUrls.MetadataUri(idOrSymbol, new[] { string.Empty })).ConfigureAwait(false)
         : await GetAsync <ResponseMain <Dictionary <string, CryptoCurrencyInfoData> > >(
                CryptoCurrencyApiUrls.MetadataUri(new[] { string.Empty }, idOrSymbol)).ConfigureAwait(false));
 }
Пример #2
0
        public static void Wrong_Parameters_Throws_HttpRequestException()
        {
            Exception ex = Assert.Throws <HttpRequestException>(() => QueryStringService.IsIdOrString(new[] { "asd", "1" }));

            Assert.Equal("All Parameters must be Symbol or Id", ex.Message);
        }
Пример #3
0
 public static void IsIdOrSymbolMethodCheck()
 {
     Assert.Equal("Id", QueryStringService.IsIdOrString(new[] { "1", "2", "3" }));
     Assert.Equal("Symbol", QueryStringService.IsIdOrString(new[] { "abc", "dfg", "fre" }));
 }