示例#1
0
        public void ReadAMEXAdditionalDetailsTest()
        {
            var temppath = Path.GetTempPath();
            var fileName = @"symboldirectory/AMEXCompanyList.csv";
            var url      = @"http://www.nasdaq.com/screening/companies-by-name.aspx?letter=0&exchange=amex&render=download";
            var gf       = new GetFiles(temppath, url, fileName);
            var result   = gf.ReadExternalFile(url, fileName).Result;

            Assert.AreEqual(true, result);
        }
示例#2
0
        public void ReadOtherListedFromExternalSourceTest()
        {
            var temppath = Path.GetTempPath();
            var fileName = @"symboldirectory/otherlisted.txt";
            var url      = @"ftp://ftp.nasdaqtrader.com";
            var gf       = new GetFiles(temppath, url, fileName);
            var result   = gf.ReadExternalFile(url, fileName).Result;

            Assert.AreEqual(true, result);
        }
示例#3
0
        public void ReadETFListFormExternalSourceTest()
        {
            var temppath = Path.GetTempPath();
            var fileName = @"symboldirectory/ETFList.csv";
            var url      = @"http://www.nasdaq.com/investing/etfs/etf-finder-results.aspx?download=Yes";
            var gf       = new GetFiles(temppath, url, fileName);
            var result   = gf.ReadExternalFile(url, fileName).Result;

            Assert.AreEqual(true, result);
        }
示例#4
0
        internal Task <bool>[] GetAllExternalData(string destinationFolder)
        {
            var gf       = new GetFiles(destinationFolder);
            var retValue = new List <Task <bool> >();

            foreach (var file in _fileList)
            {
                var fileName = file.Key;
                var rv       = gf.ReadExternalFile(_fileList[fileName], fileName);
                retValue.Add(rv);
            }
            return(retValue.ToArray());
        }