9 namespace Deveel.Data.Store.Journaled {
15 private const string DatabaseName =
"test_db";
16 private const string TestAdminUser =
"SA";
17 private const string TestAdminPass =
"abc1234";
21 dbConfig.SetValue(
"database.name", DatabaseName);
23 dbConfig.SetValue(
"database.basePath", Environment.CurrentDirectory);
29 systemContext = systemBuilder.BuildSystem();
31 var dbConfig = CreateDatabaseConfig();
33 if (testName !=
"CreateNewDatabase") {
34 database = systemContext.
CreateDatabase(dbConfig, TestAdminUser, TestAdminPass);
40 var test = TestContext.CurrentContext.Test;
47 if (database != null) {
52 var dirName = Path.Combine(Environment.CurrentDirectory, DatabaseName);
53 if (Directory.Exists(dirName))
54 Directory.Delete(dirName);
void Close()
Closes the database making it not accessible to connections.
IDatabase CreateDatabase(IConfiguration configuration, string adminUser, string adminPassword)
The representation of a single database in the system.
static IConfiguration CreateDatabaseConfig()
Defines the contract for the configuration node of a component within the system or of the system its...
void OnSetUp(string testName)
Configuration(bool isRoot)
Constructs the Configuration.