public async Task <ActionResult <AccountDto> > CreateNewAccount() { var profileId = _httpContextAccessor.GetUserIdentifier(); if (profileId == null) { return(NotFound()); } var newAccount = await _accountsManager.CreateNewAccountAsync(profileId); if (newAccount == null) { return(NotFound()); } return(CreatedAtAction(nameof(CreateNewAccount), new { id = newAccount.Id }, newAccount)); }
public async void Should_CreateNewAccountAsync_Valid() { var newCreatedAccount = await _manager.CreateNewAccountAsync("999"); Assert.NotNull(newCreatedAccount); }