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); }
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); }
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); }
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()); }