Exemplo n.º 1
0
 private static void Init()
 {
     log4net.Config.XmlConfigurator.Configure();
     _log = LogManager.GetLogger(typeof(Program));
     _htmlWebWrapper = new HtmlWebWrapper(_log);
     _japaneseHtmlWebWrapper = new HtmlWebWrapper(_log, System.Text.Encoding.GetEncoding("EUC-JP"));
     var sqlPath = Path.GetFullPath(@"..\..\..\VehicleStatsData\SQLDatabase.mdf");
     _sqlExtractRepository = RepositoryFactory.GetRepository("SqlExtractRepository", new object[] { _log,  @"Data Source=(LocalDB)\v11.0;AttachDbFilename=" + sqlPath + ";Integrated Security=True" });
     //_fileStatsRepository = RepositoryFactory.GetRepository("FileExtractRepository", new object[] { _log, outputPath });
     //_argBuilder = new AutoTraderArgumentBuilder(_htmlWebWrapper, _log);
     _gooNetArgBuilder = new GooNetArgumentBuilder(_japaneseHtmlWebWrapper, _log);
     _autoTraderScraper = new AutoTraderZaPageScraper(_log);
     _gooNetPageScraper = new GooNetPageScraper();
 }
 private HtmlDocument GetTestDocument()
 {
     HtmlWebWrapper wrapper = new HtmlWebWrapper(_log);
     var testDocumentPath = Path.GetFullPath(@"TestData\Used cars for sale in South Africa   Auto Trader South Africa.htm");
     return wrapper.Load(testDocumentPath);
 }