Esempio n. 1
0
 DataLayerAccessManager()
 {
     database    = PostgresSqlConnector.Instance();
     tourDAO     = new TourSqlPostgresDAO(database);
     logDAO      = new LogSqlPostgresDAO(database);
     fileManager = Filemanager.GetInstance(tourDAO, logDAO);
     mapQuest    = RestDataClass.Instance();
 }
Esempio n. 2
0
        public void GetImagesFromFolder()
        {
            var         db      = PostgresSqlConnector.Instance();
            var         tourdao = new TourSqlPostgresDAO(db);
            Filemanager fm      = Filemanager.GetInstance(tourdao, new LogSqlPostgresDAO(db));

            Assert.IsNotNull(fm.GetAllImagesFromFolder());
        }
Esempio n. 3
0
        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);
        }