DataLayerAccessManager() { database = PostgresSqlConnector.Instance(); tourDAO = new TourSqlPostgresDAO(database); logDAO = new LogSqlPostgresDAO(database); fileManager = Filemanager.GetInstance(tourDAO, logDAO); mapQuest = RestDataClass.Instance(); }
public void GetImagesFromFolder() { var db = PostgresSqlConnector.Instance(); var tourdao = new TourSqlPostgresDAO(db); Filemanager fm = Filemanager.GetInstance(tourdao, new LogSqlPostgresDAO(db)); Assert.IsNotNull(fm.GetAllImagesFromFolder()); }
public void GetAllImagesFromDB() { BusinessLayerManager BLM = new BusinessLayerManager(); List <Tour> tourlist = BLM.GetAllToursFromDB(); TourSqlPostgresDAO tourdao = new TourSqlPostgresDAO(PostgresSqlConnector.Instance()); List <string> imageList = (List <string>)tourdao.GetAllTourImages(); Assert.AreEqual(tourlist.Count, imageList.Count); }