public async void CreateWithInvalidName(string user, string password) { var statement = new CreateUserStatement(user, new PasswordIdentificationInfo(password)); var result = await statement.ExecuteAsync(adminContext); Assert.NotNull(result); Assert.True(result.IsError()); Assert.IsType <SqlStatementException>(result.Error()); }
public async void AdminCreatesUserWithPassword(string user, string password) { var statement = new CreateUserStatement(user, new PasswordIdentificationInfo(password)); var result = await statement.ExecuteAsync(adminContext); Assert.NotNull(result); Assert.True(result.IsEmpty()); Assert.Equal(user, createdUser); }
public async void UserCreatesOtherUser(string user, string password) { var statement = new CreateUserStatement(user, new PasswordIdentificationInfo(password)); await Assert.ThrowsAsync <UnauthorizedAccessException>(() => statement.ExecuteAsync(userContext)); }