예제 #1
0
        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));
 }