DoLoad() public method

public DoLoad ( ) : List
return List
Esempio n. 1
0
 private static void ParseDecompressedToDB()
 {
     string folder = @"C:\Temp\spontaneouse\catalogData";
     CrawledProducts productsDb = new CrawledProducts();
     DBLoader dbLoader = new DBLoader(productsDb.DB, folder);
     var statuses = dbLoader.DoLoad();
     foreach (var status in statuses)
     {
         log.InfoFormat("File ={0}, excepton={1}.", status.File, status.ErrorException);
     }
 }
Esempio n. 2
0
        public void DBLoader_Test()
        {
            //arrange
            string folder = @"C:\Temp\spontaneouse\catalogData";
            var  testdb = new MongoDBForTest().DB;
            testdb.Drop();
            DBLoader dbLoader = new DBLoader(testdb, folder);

            Assert.IsTrue(dbLoader.FilesForLoadingToDB.Length > 0);

            //act
            var statuses = dbLoader.DoLoad();

            Assert.AreEqual(statuses.Count, dbLoader.FilesForLoadingToDB.Length);
        }