private void PrepareDatabase()
        {
            var ct = CancellationToken.None;

            using (var connection = new OracleConnection(ConnectionString))
                using (var context = new MigratorTestContext(connection))
                {
                    var manager = new OracleMigrationManager <MigratorTestContext>(
                        context, new DefaultNamingNormalizer <MigratorTestContext>(), LoggingManager.LoggerFactory);

                    manager.PrepareDatabaseAsync(ct)
                    .ConfigureAwait(false)
                    .GetAwaiter()
                    .GetResult();

                    string migrationId;
                    string className;
                    MigrationsTestHelper.GenerateMigrationInfo(
                        DateTimeOffset.UtcNow, out migrationId, out className);

                    //  Existing static migration
                    manager.AddMigrationAsync(migrationId, className, null, ct)
                    .ConfigureAwait(false)
                    .GetAwaiter()
                    .GetResult();
                }
        }
 public EmptyDatabaseFixture() : base(
         "Data Source=.; Initial Catalog=master; Integrated Security=True; Connect Timeout=15;Encrypt=False;TrustServerCertificate=False;MultipleActiveResultSets=True;App=SimpleSoft.Database.Migrator.Tests.SqlServer",
         "Data Source=.; Initial Catalog=MigratorTestEmpty; Integrated Security=True; Connect Timeout=15;Encrypt=False;TrustServerCertificate=False;MultipleActiveResultSets=True;App=SimpleSoft.Database.Migrator.Tests.SqlServer",
         "MigratorTestEmpty", true)
 {
     Context = new MigratorTestContext(Connection);
 }
 public EmptyDatabaseFixture() : base(
         "DATA SOURCE=LocalOracle/xe;USER ID=MIGRATORMASTER;PASSWORD=MIGRATORMASTER;VALIDATE CONNECTION=TRUE;",
         "DATA SOURCE=LocalOracle/xe;USER ID=MIGRATORTESTEMPTY;PASSWORD=MIGRATORTESTEMPTY;VALIDATE CONNECTION=TRUE;",
         "MIGRATORTESTEMPTY", "MIGRATORTESTEMPTY", true)
 {
     Context = new MigratorTestContext(Connection);
 }
        /// <inheritdoc />
        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);

            if (disposing)
            {
                Context?.Dispose();
            }
            Context = null;
        }
        public ExistingDatabaseFixture() : base(
                "DATA SOURCE=LocalOracle/xe;USER ID=MIGRATORMASTER;PASSWORD=MIGRATORMASTER;VALIDATE CONNECTION=TRUE;",
                "DATA SOURCE=LocalOracle/xe;USER ID=MIGRATORTEST;PASSWORD=MIGRATORTEST;VALIDATE CONNECTION=TRUE;",
                "MIGRATORTEST", "MIGRATORTEST")
        {
            PrepareDatabase();

            Context = new MigratorTestContext(Connection);
            Manager = new OracleMigrationManager <MigratorTestContext>(
                Context, new DefaultNamingNormalizer <MigratorTestContext>(), LoggingManager.LoggerFactory);
        }
        public ExistingDatabaseFixture() : base(
                "Data Source=.; Initial Catalog=master; Integrated Security=True; Connect Timeout=15;Encrypt=False;TrustServerCertificate=False;MultipleActiveResultSets=True;App=SimpleSoft.Database.Migrator.Tests.SqlServer",
                "Data Source=.; Initial Catalog=MigratorTest; Integrated Security=True; Connect Timeout=15;Encrypt=False;TrustServerCertificate=False;MultipleActiveResultSets=True;App=SimpleSoft.Database.Migrator.Tests.SqlServer",
                "MigratorTest")
        {
            PrepareDatabase();

            Context = new MigratorTestContext(Connection);
            Manager = new SqlServerMigrationManager <MigratorTestContext>(
                Context, new DefaultNamingNormalizer <MigratorTestContext>(), LoggingManager.LoggerFactory);
        }