コード例 #1
0
ファイル: MySQLDataStoreTests.cs プロジェクト: ctacke/orm
        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);
        }
コード例 #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();
            }
        }
コード例 #3
0
ファイル: MySQLDetailedTests.cs プロジェクト: zhabis/nfx
        private MySQLDataStore makeDataStore()
        {
            var datastore = new MySQLDataStore(m_ConnectionString);

            datastore.QueryResolver.ScriptAssembly = "NFX.ITest";
            return(datastore);
        }
コード例 #4
0
ファイル: MySQLRegionTest.cs プロジェクト: boodie/Opensim2
        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();
            }
        }
コード例 #5
0
ファイル: MySQLTests.cs プロジェクト: zhabis/nfx
 public void ManualDS_ASYNC_QueryInsertQuery()
 {
     using (var store = new MySQLDataStore(getConnectString()))
     {
         store.QueryResolver.ScriptAssembly = SCRIPT_ASM;
         clearAllTables();
         TestLogic.ASYNC_QueryInsertQuery(store);
     }
 }
コード例 #6
0
ファイル: MySQLTests.cs プロジェクト: zhabis/nfx
 public void ManualDS_InsertThenUpsert_TypedRow()
 {
     using (var store = new MySQLDataStore(getConnectString()))
     {
         store.QueryResolver.ScriptAssembly = SCRIPT_ASM;
         clearAllTables();
         TestLogic.InsertThenUpsert_TypedRow(store);
     }
 }
コード例 #7
0
ファイル: MySQLTests.cs プロジェクト: zhabis/nfx
 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);
     }
 }
コード例 #8
0
ファイル: MySQLTests.cs プロジェクト: zhabis/nfx
 public void ManualDS_ASYNC_Populate_OpenCursor()
 {
     using (var store = new MySQLDataStore(getConnectString()))
     {
         store.QueryResolver.ScriptAssembly = SCRIPT_ASM;
         clearAllTables();
         TestLogic.Populate_ASYNC_OpenCursor(store);
         clearAllTables();
     }
 }
コード例 #9
0
ファイル: MySQLTests.cs プロジェクト: zhabis/nfx
 public void ManualDS_UpsertWithPredicate()
 {
     using (var store = new MySQLDataStore(getConnectString()))
     {
         store.QueryResolver.ScriptAssembly = SCRIPT_ASM;
         clearAllTables();
         TestLogic.UpsertWithPredicate(store);
         clearAllTables();
     }
 }
コード例 #10
0
ファイル: MySQLTests.cs プロジェクト: mjaric/nfx
 public void ManualDS_TypedRowTestVariousTypes()
 {
     using (var store = new MySQLDataStore(getConnectString()))
     {
         store.StringBool = false;
         store.QueryResolver.ScriptAssembly = SCRIPT_ASM;
         clearAllTables();
         TestLogic.TypedRowTestVariousTypes(store);
     }
 }
コード例 #11
0
ファイル: MySQLTests.cs プロジェクト: zhabis/nfx
 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);
     }
 }
コード例 #12
0
ファイル: MySQLTests.cs プロジェクト: zhabis/nfx
        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);
            }
        }
コード例 #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();
            }
        }
コード例 #14
0
ファイル: UnitTest1.cs プロジェクト: lordofffarm/orm
        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);
        }
コード例 #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();
            }
        }