public void CreateNewContext() { IDatabaseContext context = null; Assert.DoesNotThrow(() => context = new DatabaseContext(systemContext,TestDbName)); Assert.IsNotNull(context); Assert.AreEqual(TestDbName, context.DatabaseName()); Assert.IsInstanceOf<InMemoryStorageSystem>(context.StoreSystem); }
public void TestSetup() { testSequenceName = ObjectName.Parse("APP.test_sequence"); var dbConfig = Configuration.Configuration.Empty; dbConfig.SetValue(DatabaseConfigKeys.DatabaseName, "testdb"); var systemContext = new SystemContext(Configuration.Configuration.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); } }