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); }
protected override SqlStatement VisitCreateRole(CreateRoleStatement statement) { builder.AppendFormat("CREATE ROLE {0}", statement.RoleName); return(base.VisitCreateRole(statement)); }
protected virtual SqlStatement VisitCreateRole(CreateRoleStatement statement) { return new CreateRoleStatement(statement.RoleName); }
protected override SqlStatement VisitCreateRole(CreateRoleStatement statement) { builder.AppendFormat("CREATE ROLE {0}", statement.RoleName); return base.VisitCreateRole(statement); }
protected virtual SqlStatement VisitCreateRole(CreateRoleStatement statement) { return(new CreateRoleStatement(statement.RoleName)); }
public async void UserCreatesRole(string role) { var statement = new CreateRoleStatement(role); await Assert.ThrowsAsync <UnauthorizedAccessException>(() => statement.ExecuteAsync(userContext)); }
public void CreateRole_AsString(string role, string expected) { var statement = new CreateRoleStatement(role); Assert.Equal(expected, statement.ToSqlString()); }