public async void AdminGrantsRoleToUser(string user, string role) { var statement = new GrantRoleStatement(user, role); var result = await statement.ExecuteAsync(adminContext); Assert.NotNull(result); Assert.True(result.IsEmpty()); Assert.Equal(user, grantedUser); Assert.Equal(role, grantedRole); }
public async void UserCreatesOtherUser(string user, string role) { var statement = new GrantRoleStatement(user, role); await Assert.ThrowsAsync <UnauthorizedAccessException>(() => statement.ExecuteAsync(userContext)); }