DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
CreateUserStatementTests.cs
Go to the documentation of this file.
1 //
2 // Copyright 2010-2014 Deveel
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 using System;
16 using System.Collections.Generic;
17 
18 using Deveel.Data;
19 
20 using NUnit.Framework;
21 
22 namespace Deveel.Data.Sql.Statements {
23  [TestFixture]
25  [Test]
26  public void ParseSimpleCreateUser() {
27  const string sql = "CREATE USER test IDENTIFIED BY PASSWORD '123456789';";
28 
29  IEnumerable<SqlStatement> statements = null;
30  Assert.DoesNotThrow(() => statements = SqlStatement.Parse(Query.Context, sql));
31 
32  Assert.IsNotNull(statements);
33 
34  }
35  }
36 }
IQueryContext Context
Definition: Query.cs:68
Represents the foundation class of SQL statements to be executed.
Definition: SqlStatement.cs:32
static IEnumerable< SqlStatement > Parse(string sqlSource)
Parses a given string into one of more statements.