DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
Deveel.Data.Store.SingleFileStoreTests Class Reference

Public Member Functions

void SetUp ()
 
void TearDown ()
 
void CreateNewDatabase ()
 

Private Member Functions

void OnSetUp (string testName)
 

Static Private Member Functions

static IConfiguration CreateDatabaseConfig ()
 
static string GetDbFileName ()
 

Private Attributes

ISystem systemContext
 
IDatabase database
 
const string DatabaseName = "test_db"
 
const string TestAdminUser = "SA"
 
const string TestAdminPass = "abc1234"
 

Detailed Description

Definition at line 24 of file SingleFileStoreTests.cs.

Member Function Documentation

static IConfiguration Deveel.Data.Store.SingleFileStoreTests.CreateDatabaseConfig ( )
inlinestaticprivate

Definition at line 32 of file SingleFileStoreTests.cs.

32  {
33  var dbConfig = new Configuration.Configuration();
34  dbConfig.SetValue("database.name", DatabaseName);
35  dbConfig.SetValue("database.storageSystem", DefaultStorageSystemNames.SingleFile);
36  dbConfig.SetValue("database.basePath", Environment.CurrentDirectory);
37  return dbConfig;
38  }
Configuration(bool isRoot)
Constructs the Configuration.
void Deveel.Data.Store.SingleFileStoreTests.CreateNewDatabase ( )
inline

Definition at line 77 of file SingleFileStoreTests.cs.

77  {
78  var dbConfig = CreateDatabaseConfig();
80  }
IDatabase CreateDatabase(IConfiguration configuration, string adminUser, string adminPassword)
static string Deveel.Data.Store.SingleFileStoreTests.GetDbFileName ( )
inlinestaticprivate

Definition at line 40 of file SingleFileStoreTests.cs.

40  {
41  var localPath = Environment.CurrentDirectory;
42  var fileName = String.Format("{0}.db", DatabaseName);
43  return Path.Combine(localPath, fileName);
44  }
A long string in the system.
void Deveel.Data.Store.SingleFileStoreTests.OnSetUp ( string  testName)
inlineprivate

Definition at line 46 of file SingleFileStoreTests.cs.

46  {
47  var systemBuilder = new SystemBuilder();
48  systemContext = systemBuilder.BuildSystem();
49 
50  var dbConfig = CreateDatabaseConfig();
51 
52  if (testName != "CreateNewDatabase") {
54  }
55  }
IDatabase CreateDatabase(IConfiguration configuration, string adminUser, string adminPassword)
void Deveel.Data.Store.SingleFileStoreTests.SetUp ( )
inline

Definition at line 58 of file SingleFileStoreTests.cs.

58  {
59  var test = TestContext.CurrentContext.Test;
60 
61  OnSetUp(test.Name);
62  }
void Deveel.Data.Store.SingleFileStoreTests.TearDown ( )
inline

Definition at line 65 of file SingleFileStoreTests.cs.

65  {
66  if (database != null) {
67  database.Close();
68  database.Dispose();
69  }
70 
71  var fileName = GetDbFileName();
72  if (File.Exists(fileName))
73  File.Delete(fileName);
74  }
void Close()
Closes the database making it not accessible to connections.

Member Data Documentation

IDatabase Deveel.Data.Store.SingleFileStoreTests.database
private

Definition at line 26 of file SingleFileStoreTests.cs.

const string Deveel.Data.Store.SingleFileStoreTests.DatabaseName = "test_db"
private

Definition at line 28 of file SingleFileStoreTests.cs.

ISystem Deveel.Data.Store.SingleFileStoreTests.systemContext
private

Definition at line 25 of file SingleFileStoreTests.cs.

const string Deveel.Data.Store.SingleFileStoreTests.TestAdminPass = "abc1234"
private

Definition at line 30 of file SingleFileStoreTests.cs.

const string Deveel.Data.Store.SingleFileStoreTests.TestAdminUser = "SA"
private

Definition at line 29 of file SingleFileStoreTests.cs.


The documentation for this class was generated from the following file: