Esempio n. 1
0
        static void Main()
        {
            DbSystem dbSystem = new DbSystem();

            // Database create test

            CreateDbTest createDb = new CreateDbTest();
            if (!createDb.createDbTest( CREATE_DB_NAME, dbSystem))
            {
                return;
            }

            // Database open test

            OpenDbTest openDb = new OpenDbTest();
            if (!openDb.openDbTest( CREATE_DB_NAME, dbSystem))
            {
                return;
            }

            // DOM Nodes test

            DOMNodesTest domNodes = new DOMNodesTest();
            if (!domNodes.domNodesTest( TEST_DB_NAME, dbSystem))
            {
                return;
            }

            // Import tests

            ImportTests importTest = new ImportTests();
            if (!importTest.importTests( TEST_DB_NAME, dbSystem))
            {
                return;
            }

            // Statistics test

            #if !mono

            // CANT GET THIS TEST TO WORK ON MONO FOR NOW, SO WE COMPILE IT OUT
            StatsTests statsTests = new StatsTests();
            if (!statsTests.statsTests( CREATE_DB_NAME, dbSystem))
            {
                return;
            }
            #endif

            // Database copy test

            CopyDbTest copyDb = new CopyDbTest();
            if (!copyDb.copyDbTest( CREATE_DB_NAME, COPY_DB_NAME, dbSystem))
            {
                return;
            }
            if (!copyDb.copyDbTest( TEST_DB_NAME, COPY2_DB_NAME, dbSystem))
            {
                return;
            }

            // Database rename test

            RenameDbTest renameDb = new RenameDbTest();
            if (!renameDb.renameDbTest( COPY2_DB_NAME, RENAME_DB_NAME, dbSystem))
            {
                return;
            }

            // Database backup test

            BackupDbTest backupDb = new BackupDbTest();
            if (!backupDb.backupDbTest( RENAME_DB_NAME, BACKUP_PATH, dbSystem))
            {
                return;
            }

            // Database restore test

            RestoreDbTest restoreDb = new RestoreDbTest();
            if (!restoreDb.restoreDbTest( RESTORE_DB_NAME, BACKUP_PATH, dbSystem))
            {
                return;
            }

            // Database rebuild test

            RebuildDbTest rebuildDb = new RebuildDbTest();
            if (!rebuildDb.rebuildDbTest( RESTORE_DB_NAME, REBUILD_DB_NAME, dbSystem))
            {
                return;
            }

            // Database check test

            CheckDbTest checkDb = new CheckDbTest();
            if (!checkDb.checkDbTest( CREATE_DB_NAME, dbSystem))
            {
                return;
            }
            if (!checkDb.checkDbTest( COPY_DB_NAME, dbSystem))
            {
                return;
            }
            if (!checkDb.checkDbTest( RESTORE_DB_NAME, dbSystem))
            {
                return;
            }
            if (!checkDb.checkDbTest( RENAME_DB_NAME, dbSystem))
            {
                return;
            }
            if (!checkDb.checkDbTest( REBUILD_DB_NAME, dbSystem))
            {
                return;
            }

            // Database remove test

            RemoveDbTest removeDb = new RemoveDbTest();
            if (!removeDb.removeDbTest( CREATE_DB_NAME, dbSystem))
            {
                return;
            }
            if (!removeDb.removeDbTest( COPY_DB_NAME, dbSystem))
            {
                return;
            }
            if (!removeDb.removeDbTest( RESTORE_DB_NAME, dbSystem))
            {
                return;
            }
            if (!removeDb.removeDbTest( RENAME_DB_NAME, dbSystem))
            {
                return;
            }
            if (!removeDb.removeDbTest( REBUILD_DB_NAME, dbSystem))
            {
                return;
            }

            // Input and Output stream tests

            StreamTests streamTests = new StreamTests();
            if (!streamTests.streamTests( dbSystem))
            {
                return;
            }

            // Data vector tests

            VectorTests vectorTests = new VectorTests();
            if (!vectorTests.vectorTests( dbSystem))
            {
                return;
            }

            // Cache tests

            CacheTests cacheTests = new CacheTests();
            if (!cacheTests.cacheTests( dbSystem))
            {
                return;
            }

            // Various settings tests

            SettingsTests settingsTests = new SettingsTests();
            if (!settingsTests.settingsTests( dbSystem))
            {
                return;
            }

            // Various string comparison tests

            CompareStringTests compareStringTests = new CompareStringTests();
            if (!compareStringTests.compareStringTests( dbSystem))
            {
                return;
            }
        }
Esempio n. 2
0
        static void Main()
        {
            DbSystem dbSystem = new DbSystem();

            // Database create test

            CreateDbTest createDb = new CreateDbTest();

            if (!createDb.createDbTest(CREATE_DB_NAME, dbSystem))
            {
                return;
            }

            // Database open test

            OpenDbTest openDb = new OpenDbTest();

            if (!openDb.openDbTest(CREATE_DB_NAME, dbSystem))
            {
                return;
            }

            // DOM Nodes test

            DOMNodesTest domNodes = new DOMNodesTest();

            if (!domNodes.domNodesTest(TEST_DB_NAME, dbSystem))
            {
                return;
            }

            // Import tests

            ImportTests importTest = new ImportTests();

            if (!importTest.importTests(TEST_DB_NAME, dbSystem))
            {
                return;
            }

            // Statistics test

#if !mono
// CANT GET THIS TEST TO WORK ON MONO FOR NOW, SO WE COMPILE IT OUT
            StatsTests statsTests = new StatsTests();
            if (!statsTests.statsTests(CREATE_DB_NAME, dbSystem))
            {
                return;
            }
#endif

            // Database copy test

            CopyDbTest copyDb = new CopyDbTest();
            if (!copyDb.copyDbTest(CREATE_DB_NAME, COPY_DB_NAME, dbSystem))
            {
                return;
            }
            if (!copyDb.copyDbTest(TEST_DB_NAME, COPY2_DB_NAME, dbSystem))
            {
                return;
            }

            // Database rename test

            RenameDbTest renameDb = new RenameDbTest();
            if (!renameDb.renameDbTest(COPY2_DB_NAME, RENAME_DB_NAME, dbSystem))
            {
                return;
            }

            // Database backup test

            BackupDbTest backupDb = new BackupDbTest();
            if (!backupDb.backupDbTest(RENAME_DB_NAME, BACKUP_PATH, dbSystem))
            {
                return;
            }

            // Database restore test

            RestoreDbTest restoreDb = new RestoreDbTest();
            if (!restoreDb.restoreDbTest(RESTORE_DB_NAME, BACKUP_PATH, dbSystem))
            {
                return;
            }

            // Database rebuild test

            RebuildDbTest rebuildDb = new RebuildDbTest();
            if (!rebuildDb.rebuildDbTest(RESTORE_DB_NAME, REBUILD_DB_NAME, dbSystem))
            {
                return;
            }

            // Database check test

            CheckDbTest checkDb = new CheckDbTest();
            if (!checkDb.checkDbTest(CREATE_DB_NAME, dbSystem))
            {
                return;
            }
            if (!checkDb.checkDbTest(COPY_DB_NAME, dbSystem))
            {
                return;
            }
            if (!checkDb.checkDbTest(RESTORE_DB_NAME, dbSystem))
            {
                return;
            }
            if (!checkDb.checkDbTest(RENAME_DB_NAME, dbSystem))
            {
                return;
            }
            if (!checkDb.checkDbTest(REBUILD_DB_NAME, dbSystem))
            {
                return;
            }

            // Database remove test

            RemoveDbTest removeDb = new RemoveDbTest();
            if (!removeDb.removeDbTest(CREATE_DB_NAME, dbSystem))
            {
                return;
            }
            if (!removeDb.removeDbTest(COPY_DB_NAME, dbSystem))
            {
                return;
            }
            if (!removeDb.removeDbTest(RESTORE_DB_NAME, dbSystem))
            {
                return;
            }
            if (!removeDb.removeDbTest(RENAME_DB_NAME, dbSystem))
            {
                return;
            }
            if (!removeDb.removeDbTest(REBUILD_DB_NAME, dbSystem))
            {
                return;
            }

            // Input and Output stream tests

            StreamTests streamTests = new StreamTests();
            if (!streamTests.streamTests(dbSystem))
            {
                return;
            }

            // Data vector tests

            VectorTests vectorTests = new VectorTests();
            if (!vectorTests.vectorTests(dbSystem))
            {
                return;
            }

            // Cache tests

            CacheTests cacheTests = new CacheTests();
            if (!cacheTests.cacheTests(dbSystem))
            {
                return;
            }

            // Various settings tests

            SettingsTests settingsTests = new SettingsTests();
            if (!settingsTests.settingsTests(dbSystem))
            {
                return;
            }

            // Various string comparison tests

            CompareStringTests compareStringTests = new CompareStringTests();
            if (!compareStringTests.compareStringTests(dbSystem))
            {
                return;
            }
        }