public void WhereOrderBy() { var exchangeRate = new TcmbExchangeRate(); exchangeRate.Load(); var currency = exchangeRate.GetCurrencies(w => w.Unit == 1, o => o.CrossOrder, false).FirstOrDefault(); Assert.Equal("USD", currency.CurrencyCode.ToString()); }
public void Where() { var exchangeRate = new TcmbExchangeRate(); exchangeRate.Load(); var currency = exchangeRate.GetCurrencies(w => w.CurrencyCode == "USD").FirstOrDefault(); Assert.Equal("7.5785", currency.ForexBuying.ToString()); }
public void Load() { var exchangeRate = new TcmbExchangeRate(); exchangeRate.Load(); var currencies = exchangeRate.GetCurrencies(); Assert.Equal("20", currencies.Count.ToString()); }
public void ExportToCsv() { var exchangeRate = new TcmbExchangeRate(); exchangeRate.Load(); var currencies = exchangeRate.GetCurrencies(); string result = exchangeRate.ExportToCsv(currencies); Assert.NotEmpty(result); }
public void ExportToJson() { var exchangeRate = new TcmbExchangeRate(); exchangeRate.Load(); var currencies = exchangeRate.GetCurrencies(); var jsonExporter = new JsonExporter(); string result = exchangeRate.ExportToCustomFormat(currencies, jsonExporter); Assert.NotEmpty(result); }