Ejemplo n.º 1
0
        public DataTestLoader(bool refreshSchema = false, bool initDatabase = false, bool loadJsonData = false, string testSuite = "")
        {
            this.refreshSchema = refreshSchema;
            this.initDatabase  = initDatabase;
            this.loadJsonData  = loadJsonData;
            this.testSuite     = testSuite;

            PostgresqlScriptManager dMan = new PostgresqlScriptManager(refreshSchema, initDatabase, loadJsonData, testSuite);

            bool weCanProceed = dMan.RefreshDatabaseSchema();

            if (initDatabase && weCanProceed)
            {
                dMan.InitDatabase();
            }

            if (loadJsonData)
            {
                this.RunDataTestLoader();
            }

            if (initDatabase)
            {
                dMan.ApplySchemaPostData();
            }

            logger.Info("DataTestLoader execution completed.");
        }
Ejemplo n.º 2
0
        public DataTestLoader(bool refreshSchema = false, bool initDatabase = false, bool loadJsonData = false, string testSuite = "")
        {
            this.refreshSchema = refreshSchema;
            this.initDatabase = initDatabase;
            this.loadJsonData = loadJsonData;
            this.testSuite = testSuite;

            PostgresqlScriptManager dMan = new PostgresqlScriptManager(refreshSchema, initDatabase, loadJsonData, testSuite);

            bool weCanProceed = dMan.RefreshDatabaseSchema();

            if (initDatabase && weCanProceed)
                dMan.InitDatabase();

            if (loadJsonData)
                this.RunDataTestLoader();

            if (initDatabase)
                dMan.ApplySchemaPostData();

            logger.Info("DataTestLoader execution completed.");
        }