Exemplo n.º 1
0
        public void GetAccount_Exists_ReturnAccounModelAsync()
        {
            //Arrange
            var accountId = new Guid("9CFE55DF-65E2-4204-BAD5-08D82BD21687");

            //Act
            var result = _service.GetAccount(accountId).Result;

            //Assert
            Assert.IsType <AccountModel>(result);
        }
Exemplo n.º 2
0
        public async Task <IActionResult> GetAccount([FromQuery] string accountId)
        {
            try
            {
                var account = await _accountInfoService.GetAccount(new Guid(accountId));

                return(Ok(_mapper.Map <AccountDTO>(account)));
            }
            catch (Exception e)
            {
                throw e;
            }
        }