public void DropExisting() { var statement = new DropUserStatement(UserName); statement.Execute(Query); var exists = Query.UserExists(UserName); Assert.IsFalse(exists); }
public async void AdminCreatesUserWithPassword(string user) { var statement = new DropUserStatement(user); var result = await statement.ExecuteAsync(adminContext); Assert.NotNull(result); Assert.True(result.IsEmpty()); Assert.Equal(user, droppedUser); }
public async void UserInAdminRoleDropsOtherUser(string user) { var statement = new DropUserStatement(user); var result = await statement.ExecuteAsync(userInAdminRoleContext); Assert.NotNull(result); Assert.True(result.IsEmpty()); Assert.Equal(user, droppedUser); }
protected override SqlStatement VisitDropUser(DropUserStatement statement) { builder.AppendFormat("DROP USER {0}", statement.UserName); return(base.VisitDropUser(statement)); }
public void DropUser_AsString(string user, string expected) { var statement = new DropUserStatement(user); Assert.Equal(expected, statement.ToSqlString()); }
public async void UserDropsOtherUser(string user) { var statement = new DropUserStatement(user); await Assert.ThrowsAsync <UnauthorizedAccessException>(() => statement.ExecuteAsync(userContext)); }
protected virtual SqlStatement VisitDropUser(DropUserStatement statement) { return new DropUserStatement(statement.UserName); }
protected override SqlStatement VisitDropUser(DropUserStatement statement) { builder.AppendFormat("DROP USER {0}", statement.UserName); return base.VisitDropUser(statement); }
protected virtual SqlStatement VisitDropUser(DropUserStatement statement) { return(new DropUserStatement(statement.UserName)); }