Ejemplo n.º 1
0
        public async Task CarregarHistoricoPedidosClientesExistentes()
        {
            //Arrange
            var clienteId = 3;

            //Act
            var historico = await _clienteAppService.CarregarPedidosCliente(clienteId);

            //Assert
            Assert.True(historico.Pedidos.Count > 0);
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> Get(int id)
        {
            try
            {
                var historico = await _clienteAppService.CarregarPedidosCliente(id);

                return(Ok(historico));
            }
            catch (Exception ex)
            {
                BadRequest(ex.Message);
                throw;
            }
        }