public async Task UpdateWalletAsync_ValidWallet_WalletUpdated()
        {
            var updatedWallet = fixture.UserWithWallets.Wallets.First();

            SetupMocksUpdate(updatedWallet);

            await service.UpdateWalletAsync(fixture.UserWithWallets.UserId, updatedWallet.WalletId,
                                            fixture.UpdateWalletDto);

            VerifyMocksUpdate(fixture.UserWithWallets.UserId, updatedWallet.WalletId, updatedWallet, Times.Once());
        }
Пример #2
0
        public async Task <IActionResult> UpdateWalletsAsync(int id, [FromBody] UpdateWalletModel wallet)
        {
            var userId          = GetUserId();
            var updateWalletDto = Mapper.Map <UpdateWalletDto>(wallet);
            await walletService.UpdateWalletAsync(userId, id, updateWalletDto);

            return(NoContent());
        }