예제 #1
0
        public void test_url_manager()
        {
            UrlFileManager manager = new UrlFileManager();

            manager.Add(URL);
            manager.Add("#this is a comment");

            Assert.AreEqual(manager.Urls.Count(), 1);
        }
예제 #2
0
        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\""));
        }
예제 #3
0
        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");
        }
예제 #4
0
        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");
        }
예제 #5
0
        public void test_url_type()
        {
            UrlFileManager manager = new UrlFileManager();

            manager.Add(URL);

            CryptoCompareUrl model = new CryptoCompareUrl(manager.Urls.First());

            Assert.AreEqual(model.GetUrlType(), "pairs");
        }
예제 #6
0
        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"));
        }