protected virtual IDatabase CreateDatabase(IDatabaseContext context) { var database = new Database(context); database.Create(AdminUserName, AdminPassword); database.Open(); return database; }
public void TestSetup() { testSequenceName = ObjectName.Parse("APP.test_sequence"); var dbConfig = DbConfig.Empty; dbConfig.SetValue(DatabaseConfigKeys.DatabaseName, "testdb"); var systemContext = new SystemContext(DbConfig.SystemDefault); var dbContext = new DatabaseContext(systemContext, dbConfig); var database = new Database(dbContext); database.Create("SA", "12345"); database.Open(); transaction = database.CreateTransaction(TransactionIsolation.Serializable); if (TestContext.CurrentContext.Test.Name != "CreateNormalSequence") { var seqInfo = new SequenceInfo(testSequenceName, new SqlNumber(0), new SqlNumber(1), new SqlNumber(0), new SqlNumber(Int64.MaxValue), 126); transaction.CreateSequence(seqInfo); } }