Exemple #1
0
        public static void ClearDatabaseThenImportProject(Stream kspStream)
        {
            LegacyMode.UseLegacy();
            ClearDatabase();

            ImportProject(kspStream);

            ExecuteScript(ReadStream("KProcess.Ksmed.Business.Tests.Resources.SQL.Users.sql"), false);
        }
Exemple #2
0
        public static void ImportDatabaseBackup(string backupPath)
        {
            LegacyMode.UseLegacy();

            var backupDir      = ExecuteScalar <string>(ReadStream("KProcess.Ksmed.Business.Tests.Resources.SQL.GetBackupPath.sql"), true);
            var destBackupPath = Path.Combine(backupDir, "KProcess.Ksmed.bak");

            File.Copy(backupPath, destBackupPath, true);

            ExecuteScript(ReadStream("KProcess.Ksmed.Business.Tests.Resources.SQL.RestoreDatabase.sql"), true);
        }
Exemple #3
0
 public static void ClearDatabase()
 {
     LegacyMode.UseLegacy();
     Initialization.SetCurrentUser();
     ExecuteScript(ReadStream("KProcess.Ksmed.Business.Tests.Resources.SQL.CleanDatabase.sql"), false);
 }