public async Task CreateUser(UserModel userModel) { var userExisted = await ReportingWork .UserExists(userModel.Email) .ConfigureAwait(false); if (userExisted) { throw new UserManagementException("User already created in usermanagement"); } await LoggingWork .CreateUserAsync(userModel) .ConfigureAwait(false); }
public void CreateUserAsync_Null_UserModel() { Assert.ThrowsAsync <ArgumentNullException>(async() => await _loggingWork.CreateUserAsync(null)); }