示例#1
0
        public void TestSQLSaveForeign()
        {
            PageForeign page = new PageForeign();
            DateTime    date = new DateTime(2019, 1, 3);
            String      path = page.getFileName(date);

            using (StreamReader sr = new StreamReader(@"C:\Temp\htmldwl" + path, Encoding.GetEncoding("utf-8")))
            {
                ArrayList stock_data = page.ParseHtml(sr.ReadToEnd(), date);
                DbSql.StockData_SaveForeign(stock_data);
            }
        }
示例#2
0
        public void TestParseForeignHtml()
        {
            PageForeign page = new PageForeign();


            DateTime date = new DateTime(2019, 1, 3);
            String   path = page.getFileName(date);

            String srcDir = @"C:\Temp\htmldwl";

            if (File.Exists(srcDir + path) == false)
            {
                //Logger.e("File " + srcDir + path + " not found!!");
                //continue;
            }

            using (StreamReader sr = new StreamReader(srcDir + path, Encoding.GetEncoding("utf-8")))
            {
                page.ParseHtml(sr.ReadToEnd(), date);
            }

            Assert.Pass();
        }