Inheritance: SqlStatement
示例#1
0
        public async void AdminCreatesRole(string role)
        {
            var statement = new DropRoleStatement(role);
            var result    = await statement.ExecuteAsync(adminContext);

            Assert.NotNull(result);
            Assert.True(result.IsEmpty());
            Assert.Equal(role, droppedRole);
        }
示例#2
0
        protected override SqlStatement VisitDropRole(DropRoleStatement statement)
        {
            builder.AppendFormat("DROP ROLE {0}", statement.RoleName);

            return(base.VisitDropRole(statement));
        }
示例#3
0
 protected virtual SqlStatement VisitDropRole(DropRoleStatement statement)
 {
     return new DropRoleStatement(statement.RoleName);
 }
示例#4
0
        public async void UserCreatesRole(string role)
        {
            var statement = new DropRoleStatement(role);

            await Assert.ThrowsAsync <UnauthorizedAccessException>(() => statement.ExecuteAsync(userContext));
        }
示例#5
0
        protected override SqlStatement VisitDropRole(DropRoleStatement statement)
        {
            builder.AppendFormat("DROP ROLE {0}", statement.RoleName);

            return base.VisitDropRole(statement);
        }
示例#6
0
 protected virtual SqlStatement VisitDropRole(DropRoleStatement statement)
 {
     return(new DropRoleStatement(statement.RoleName));
 }