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); }
protected override SqlStatement VisitDropRole(DropRoleStatement statement) { builder.AppendFormat("DROP ROLE {0}", statement.RoleName); return(base.VisitDropRole(statement)); }
protected virtual SqlStatement VisitDropRole(DropRoleStatement statement) { return new DropRoleStatement(statement.RoleName); }
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); }
protected virtual SqlStatement VisitDropRole(DropRoleStatement statement) { return(new DropRoleStatement(statement.RoleName)); }