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

Public Member Functions

void OpenCursorWithoutArguments ()
 
void OpenCursorWithArguments ()
 
- Public Member Functions inherited from Deveel.Data.ContextBasedTest
void TestSetUp ()
 
void TestFixtureSetUp ()
 
void TestTearDown ()
 
void TestFixtureTearDown ()
 

Additional Inherited Members

- 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 OnSetUp (string testName)
 
virtual void OnTearDown ()
 
- 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 24 of file OpenStatementTests.cs.

Member Function Documentation

void Deveel.Data.Sql.Statements.OpenStatementTests.OpenCursorWithArguments ( )
inline

Definition at line 43 of file OpenStatementTests.cs.

43  {
44  const string sql = "OPEN c1(34, 'user')";
45 
46  var statements = SqlStatement.Parse(sql);
47  Assert.IsNotNull(statements);
48 
49  var statementList = statements.ToList();
50  Assert.IsNotEmpty(statementList);
51  Assert.AreEqual(1, statementList.Count);
52  Assert.IsInstanceOf<OpenStatement>(statementList[0]);
53 
54  var statement = (OpenStatement)statementList[0];
55  Assert.AreEqual("c1", statement.CursorName);
56  Assert.IsNotEmpty(statement.Arguments);
57 
58  var arg1 = statement.Arguments.First();
59  Assert.IsNotNull(arg1);
60  Assert.IsInstanceOf<SqlConstantExpression>(arg1);
61  }
An expression that holds a constant value.
void Deveel.Data.Sql.Statements.OpenStatementTests.OpenCursorWithoutArguments ( )
inline

Definition at line 26 of file OpenStatementTests.cs.

26  {
27  const string sql = "OPEN c1";
28 
29  var statements = SqlStatement.Parse(sql);
30  Assert.IsNotNull(statements);
31 
32  var statementList = statements.ToList();
33  Assert.IsNotEmpty(statementList);
34  Assert.AreEqual(1, statementList.Count);
35  Assert.IsInstanceOf<OpenStatement>(statementList[0]);
36 
37  var statement = (OpenStatement) statementList[0];
38  Assert.AreEqual("c1", statement.CursorName);
39  Assert.IsEmpty(statement.Arguments);
40  }

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