Exemplo n.º 1
0
        private MySQLDataStore GetTestStore(bool verifyExists = true)
        {
            var info = new MySQLConnectionInfo("173.10.132.188", 3306, "CropPerformance", "SolutionEngine", "rtx64");

//            var info = new MySQLConnectionInfo("192.168.10.246", 3306, "TestDB", "root", "password");

            var store = new MySQLDataStore(info);

            if (verifyExists)
            {
                if (store.StoreExists)
                {
                    store.DeleteStore();
                }

                if (!store.StoreExists)
                {
                    store.CreateStore();
                }
                else
                {
                    store.EnsureCompatibility();
                }
            }

            return(store);
        }
Exemplo n.º 2
0
        public void Init()
        {
            SuperInit();

            // If we manage to connect to the database with the user
            // and password above it is our test database, and run
            // these tests.  If anything goes wrong, ignore these
            // tests.
            try
            {
                database = new MySQLManager(connect);

                // clear db incase to ensure we are in a clean state
                ClearDB(database);

                regionDb = new MySQLDataStore();
                regionDb.Initialise(connect);
                db = new MySQLEstateStore();
                db.Initialise(connect);
            }

            catch (Exception e)
            {
                m_log.Error("Exception {0}", e);
                Assert.Ignore();
            }
        }
Exemplo n.º 3
0
        private MySQLDataStore makeDataStore()
        {
            var datastore = new MySQLDataStore(m_ConnectionString);

            datastore.QueryResolver.ScriptAssembly = "NFX.ITest";
            return(datastore);
        }
Exemplo n.º 4
0
        public void Init()
        {
            SuperInit();

            // If we manage to connect to the database with the user
            // and password above it is our test database, and run
            // these tests.  If anything goes wrong, ignore these
            // tests.
            try
            {
                database = new MySQLManager(connect);

                // this is important in case a previous run ended badly
                ClearDB(database);

                db = new MySQLDataStore();
                db.Initialise(connect);
            }

            catch (Exception e)
            {
                m_log.Error("Exception {0}", e);
                Assert.Ignore();
            }
        }
Exemplo n.º 5
0
 public void ManualDS_ASYNC_QueryInsertQuery()
 {
     using (var store = new MySQLDataStore(getConnectString()))
     {
         store.QueryResolver.ScriptAssembly = SCRIPT_ASM;
         clearAllTables();
         TestLogic.ASYNC_QueryInsertQuery(store);
     }
 }
Exemplo n.º 6
0
 public void ManualDS_InsertThenUpsert_TypedRow()
 {
     using (var store = new MySQLDataStore(getConnectString()))
     {
         store.QueryResolver.ScriptAssembly = SCRIPT_ASM;
         clearAllTables();
         TestLogic.InsertThenUpsert_TypedRow(store);
     }
 }
Exemplo n.º 7
0
 public void ManualDS_ASYNC_InsertInTransaction_Commit_TypedRow()
 {
     using (var store = new MySQLDataStore(getConnectString()))
     {
         store.QueryResolver.ScriptAssembly = SCRIPT_ASM;
         clearAllTables();
         TestLogic.ASYNC_InsertInTransaction_Commit_TypedRow(store);
     }
 }
Exemplo n.º 8
0
 public void ManualDS_ASYNC_Populate_OpenCursor()
 {
     using (var store = new MySQLDataStore(getConnectString()))
     {
         store.QueryResolver.ScriptAssembly = SCRIPT_ASM;
         clearAllTables();
         TestLogic.Populate_ASYNC_OpenCursor(store);
         clearAllTables();
     }
 }
Exemplo n.º 9
0
 public void ManualDS_UpsertWithPredicate()
 {
     using (var store = new MySQLDataStore(getConnectString()))
     {
         store.QueryResolver.ScriptAssembly = SCRIPT_ASM;
         clearAllTables();
         TestLogic.UpsertWithPredicate(store);
         clearAllTables();
     }
 }
Exemplo n.º 10
0
 public void ManualDS_TypedRowTestVariousTypes()
 {
     using (var store = new MySQLDataStore(getConnectString()))
     {
         store.StringBool = false;
         store.QueryResolver.ScriptAssembly = SCRIPT_ASM;
         clearAllTables();
         TestLogic.TypedRowTestVariousTypes(store);
     }
 }
Exemplo n.º 11
0
 public void ManualDS_GetSchemaAndTestFullGDID()
 {
     using (var store = new MySQLDataStore(getConnectString()))
     {
         store.StringBool = false;
         store.FullGDIDS  = true;
         store.QueryResolver.ScriptAssembly = SCRIPT_ASM;
         clearAllTables();
         TestLogic.GetSchemaAndTestFullGDID(store);
     }
 }
Exemplo n.º 12
0
        public void ManualDS_TypedRowTestVariousTypes_StrBool()
        {
            using (var store = new MySQLDataStore(getConnectString()))
            {
                store.StringBool     = true; //<-------- NOTICE
                store.StringForTrue  = "1";
                store.StringForFalse = "0";

                store.FullGDIDS = false;
                store.QueryResolver.ScriptAssembly = SCRIPT_ASM;
                clearAllTables();
                TestLogic.TypedRowTestVariousTypes(store);
            }
        }
Exemplo n.º 13
0
        public void Init()
        {
            SuperInit();
            // If we manage to connect to the database with the user
            // and password above it is our test database, and run
            // these tests.  If anything goes wrong, ignore these
            // tests.
            try 
            {
                // this is important in case a previous run ended badly
                ClearDB();

                db = new MySQLDataStore();
                db.Initialise(connect);
            } 
            catch (Exception e)
            {
                m_log.Error("Exception {0}", e);
                Assert.Ignore();
            }
        }
Exemplo n.º 14
0
        private MySQLDataStore GetTestStore()
        {
            var info = new MySQLConnectionInfo("192.168.10.246", 3306, "TestDB", "root", "password");

            var store = new MySQLDataStore(info);

            if (store.StoreExists)
            {
                store.DeleteStore();
            }

            if (!store.StoreExists)
            {
                store.CreateStore();
            }
            else
            {
                store.EnsureCompatibility();
            }

            return(store);
        }
Exemplo n.º 15
0
        public void Init()
        {
            SuperInit();
            // If we manage to connect to the database with the user
            // and password above it is our test database, and run
            // these tests.  If anything goes wrong, ignore these
            // tests.
            try 
            {
                // clear db incase to ensure we are in a clean state
                ClearDB();

                regionDb = new MySQLDataStore();
                regionDb.Initialise(connect);
                db = new MySQLEstateStore();
                db.Initialise(connect);
            } 
            catch (Exception e)
            {
                m_log.Error("Exception {0}", e);
                Assert.Ignore();
            }
        }