コード例 #1
0
        public async void AdminCreatesRole(string role)
        {
            var statement = new CreateRoleStatement(role);
            var result    = await statement.ExecuteAsync(adminContext);

            Assert.NotNull(result);
            Assert.True(result.IsEmpty());
            Assert.Equal(role, createdRole);
        }
コード例 #2
0
        protected override SqlStatement VisitCreateRole(CreateRoleStatement statement)
        {
            builder.AppendFormat("CREATE ROLE {0}", statement.RoleName);

            return(base.VisitCreateRole(statement));
        }
コード例 #3
0
ファイル: StatementVisitor.cs プロジェクト: deveel/deveeldb
 protected virtual SqlStatement VisitCreateRole(CreateRoleStatement statement)
 {
     return new CreateRoleStatement(statement.RoleName);
 }
コード例 #4
0
        protected override SqlStatement VisitCreateRole(CreateRoleStatement statement)
        {
            builder.AppendFormat("CREATE ROLE {0}", statement.RoleName);

            return base.VisitCreateRole(statement);
        }
コード例 #5
0
 protected virtual SqlStatement VisitCreateRole(CreateRoleStatement statement)
 {
     return(new CreateRoleStatement(statement.RoleName));
 }
コード例 #6
0
        public async void UserCreatesRole(string role)
        {
            var statement = new CreateRoleStatement(role);

            await Assert.ThrowsAsync <UnauthorizedAccessException>(() => statement.ExecuteAsync(userContext));
        }
コード例 #7
0
        public void CreateRole_AsString(string role, string expected)
        {
            var statement = new CreateRoleStatement(role);

            Assert.Equal(expected, statement.ToSqlString());
        }