DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Public Member Functions | Protected Member Functions | List of all members
Deveel.Data.Sql.VariableTests Class Reference
Inheritance diagram for Deveel.Data.Sql.VariableTests:
Deveel.Data.ContextBasedTest

Public Member Functions

void DeclareVariable ()
 
void GetVariable ()
 
void SetExistingVariable ()
 
void SetNotExistingVariable ()
 
- Public Member Functions inherited from Deveel.Data.ContextBasedTest
void TestSetUp ()
 
void TestFixtureSetUp ()
 
void TestTearDown ()
 
void TestFixtureTearDown ()
 

Protected Member Functions

override void OnSetUp (string testName)
 
- Protected Member Functions inherited from Deveel.Data.ContextBasedTest
virtual void RegisterServices (ServiceContainer container)
 
virtual ISystem CreateSystem ()
 
virtual IDatabase CreateDatabase (ISystem system, IConfiguration configuration)
 
virtual ISession CreateAdminSession (IDatabase database)
 
virtual IQuery CreateQuery (ISession session)
 
ISession CreateUserSession (string userName, string password)
 
virtual void OnTearDown ()
 

Additional Inherited Members

- Protected Attributes inherited from Deveel.Data.ContextBasedTest
const string AdminUserName = "SA"
 
const string AdminPassword = "1234567890"
 
const string DatabaseName = "testdb"
 
- Properties inherited from Deveel.Data.ContextBasedTest
virtual bool SingleContext [get]
 
IQuery Query [get, private set]
 
ISystem System [get, private set]
 
IDatabase Database [get, private set]
 
ISession Session [get, private set]
 

Detailed Description

Definition at line 25 of file VariableTests.cs.

Member Function Documentation

void Deveel.Data.Sql.VariableTests.DeclareVariable ( )
inline

Definition at line 34 of file VariableTests.cs.

34  {
35  Query.DeclareVariable("a", PrimitiveTypes.String());
36  }
Provides some helper functions for resolving and creating SqlType instances that are primitive to the...
void Deveel.Data.Sql.VariableTests.GetVariable ( )
inline

Definition at line 39 of file VariableTests.cs.

39  {
40  var variable = Query.FindVariable("a");
41 
42  Assert.IsNotNull(variable);
43  Assert.IsInstanceOf<StringType>(variable.Type);
44  }
override void Deveel.Data.Sql.VariableTests.OnSetUp ( string  testName)
inlineprotectedvirtual

Reimplemented from Deveel.Data.ContextBasedTest.

Definition at line 26 of file VariableTests.cs.

26  {
27  if (testName != "DeclareVariable")
28  Query.DeclareVariable("a", PrimitiveTypes.String());
29 
30  base.OnSetUp(testName);
31  }
Provides some helper functions for resolving and creating SqlType instances that are primitive to the...
void Deveel.Data.Sql.VariableTests.SetExistingVariable ( )
inline

Definition at line 47 of file VariableTests.cs.

47  {
48  Query.SetVariable("a", SqlExpression.Constant("test"));
49 
50  var variable = Query.FindVariable("a");
51  Assert.IsNotNull(variable);
52  Assert.IsInstanceOf<StringType>(variable.Type);
53  Assert.IsNotNull(variable.Value);
54  Assert.IsInstanceOf<StringType>(variable.Value.Type);
55  }
Defines the base class for instances that represent SQL expression tree nodes.
static SqlConstantExpression Constant(object value)
void Deveel.Data.Sql.VariableTests.SetNotExistingVariable ( )
inline

Definition at line 58 of file VariableTests.cs.

58  {
59  Query.SetVariable("b", SqlExpression.Constant(23));
60 
61  var variable = Query.FindVariable("b");
62  Assert.IsNotNull(variable);
63  Assert.IsInstanceOf<NumericType>(variable.Type);
64  Assert.IsNotNull(variable.Value);
65  Assert.IsInstanceOf<NumericType>(variable.Value.Type);
66  }
Defines the base class for instances that represent SQL expression tree nodes.
static SqlConstantExpression Constant(object value)

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