Inheritance: SqlStatement
Beispiel #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);
        }
Beispiel #2
0
        protected override SqlStatement VisitDropRole(DropRoleStatement statement)
        {
            builder.AppendFormat("DROP ROLE {0}", statement.RoleName);

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

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

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