public void test_url_manager() { UrlFileManager manager = new UrlFileManager(); manager.Add(URL); manager.Add("#this is a comment"); Assert.AreEqual(manager.Urls.Count(), 1); }
public void test_url_data() { UrlFileManager manager = new UrlFileManager(); manager.Add(URL); CryptoCompareUrl model = new CryptoCompareUrl(manager.Urls.First()); Assert.IsTrue(model.GetUrlData().StartsWith("{\"Response\":\"Success\"")); }
public void test_url_filename() { UrlFileManager manager = new UrlFileManager(); manager.Add(URL); CryptoCompareUrl model = new CryptoCompareUrl(manager.Urls.First()); Assert.AreEqual(model.GetRootFileName(), "pairs_ACT@_100.csv"); }
public void test_url_path() { UrlFileManager manager = new UrlFileManager(); manager.Add(URL); CryptoCompareUrl model = new CryptoCompareUrl(manager.Urls.First()); Assert.AreEqual(model.GetUrlPath(), "/data/top/pairs"); }
public void test_url_type() { UrlFileManager manager = new UrlFileManager(); manager.Add(URL); CryptoCompareUrl model = new CryptoCompareUrl(manager.Urls.First()); Assert.AreEqual(model.GetUrlType(), "pairs"); }
public void test_output_files() { UrlFileManager manager = new UrlFileManager(); manager.Add(URL); CryptoCompareUrl model = new CryptoCompareUrl(manager.Urls.First()); JsonEtl etl = new JsonEtl(); etl.ToCsv(model); Assert.IsTrue(File.Exists("pairs_ACT@_100_record_Id.csv")); Assert.IsTrue(File.Exists("pairs_ACT@_100_exchange.csv")); }