public async Task <WalletModel> Get(Guid id)
        {
            var request = new GetWalletById
            {
                Id = id
            };
            var response = await _mediator.Send(request);

            return(response);
        }
예제 #2
0
        public async Task Get_Wallet_By_Id_Handler()
        {
            var request = new GetWalletById
            {
                Id = _id
            };
            var handler  = new GetWalletByIdHandler(_context);
            var response = await handler.Handle(request, CancellationToken.None);

            Assert.Equal(2, response.Moneys.Length);
            Assert.Equal(1120, response.Moneys.First(y => y.CurrencyCode == "TRY").Amount);
        }