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

Public Member Functions

void TestSetup ()
 
void TearDown ()
 
void DatabaseNotExists ()
 
void CreateNew ()
 
void AuthenticateAdmin ()
 

Private Attributes

ISystem systemContext
 
IDatabase database
 
const string TestDbName = "testdb"
 
const string TestAdminUser = "SA"
 
const string TestAdminPass = "123456"
 

Detailed Description

Definition at line 23 of file DatabaseTests.cs.

Member Function Documentation

void Deveel.Data.DatabaseTests.AuthenticateAdmin ( )
inline

Definition at line 64 of file DatabaseTests.cs.

64  {
65  Assert.DoesNotThrow(() => database.Authenticate(TestAdminUser, TestAdminPass));
66  }
void Deveel.Data.DatabaseTests.CreateNew ( )
inline

Definition at line 57 of file DatabaseTests.cs.

57  {
58  var dbConfig = new Configuration.Configuration();
59  dbConfig.SetValue("database.name", TestDbName);
61  }
IDatabase CreateDatabase(IConfiguration configuration, string adminUser, string adminPassword)
void Deveel.Data.DatabaseTests.DatabaseNotExists ( )
inline

Definition at line 52 of file DatabaseTests.cs.

52  {
53  Assert.IsFalse(systemContext.DatabaseExists(TestDbName));
54  }
bool DatabaseExists(string databaseName)
void Deveel.Data.DatabaseTests.TearDown ( )
inline

Definition at line 47 of file DatabaseTests.cs.

47  {
48  database = null;
49  }
void Deveel.Data.DatabaseTests.TestSetup ( )
inline

Definition at line 32 of file DatabaseTests.cs.

32  {
33  var systemBuilder = new SystemBuilder();
34  systemContext = systemBuilder.BuildSystem();
35 
36  var test = TestContext.CurrentContext.Test.Name;
37 
38  if (test != "CreateNew" &&
39  test != "DatabaseNotExists") {
40  var dbConfig = new Configuration.Configuration();
41  dbConfig.SetValue("database.name", TestDbName);
43  }
44  }
IDatabase CreateDatabase(IConfiguration configuration, string adminUser, string adminPassword)

Member Data Documentation

IDatabase Deveel.Data.DatabaseTests.database
private

Definition at line 25 of file DatabaseTests.cs.

ISystem Deveel.Data.DatabaseTests.systemContext
private

Definition at line 24 of file DatabaseTests.cs.

const string Deveel.Data.DatabaseTests.TestAdminPass = "123456"
private

Definition at line 29 of file DatabaseTests.cs.

const string Deveel.Data.DatabaseTests.TestAdminUser = "SA"
private

Definition at line 28 of file DatabaseTests.cs.

const string Deveel.Data.DatabaseTests.TestDbName = "testdb"
private

Definition at line 27 of file DatabaseTests.cs.


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