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);
        }
예제 #4
0
        public void DropExisting()
        {
            var statement = new DropUserStatement(UserName);

            statement.Execute(Query);

            var exists = Query.UserExists(UserName);

            Assert.IsFalse(exists);
        }
예제 #5
0
        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));
        }
예제 #8
0
 protected virtual SqlStatement VisitDropUser(DropUserStatement statement)
 {
     return new DropUserStatement(statement.UserName);
 }
예제 #9
0
        protected override SqlStatement VisitDropUser(DropUserStatement statement)
        {
            builder.AppendFormat("DROP USER {0}", statement.UserName);

            return base.VisitDropUser(statement);
        }
예제 #10
0
 protected virtual SqlStatement VisitDropUser(DropUserStatement statement)
 {
     return(new DropUserStatement(statement.UserName));
 }