public void TestSQLSaveForeign() { DBManager sql_db = new DBManager(); sql_db.DBConnect(); PageJuristic page = new PageJuristic("foreign_"); 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(conn, sr.ReadToEnd(), date); sql_db.StockData_SaveForeign(stock_data); } }
public void TestParseForeignHtml() { PageJuristic page = new PageJuristic("foreign_"); 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(conn, sr.ReadToEnd(), date); } Assert.Pass(); }