public async Task GetPedidoByClienteId_Should_Return_Ok() { //Arrange var Pedidos = PedidoBuilder.GetPedidosTest(); //Act _mock.Setup(x => x.GetByClienteId(1)).Returns(Pedidos); var result = await _controller.GetByClienteId(1) as OkObjectResult; //Assert result.Should().NotBeNull("Result is null."); result.Value.Should().BeOfType <List <PedidoModel> >($"Return type is not List<PedidoModel>"); result.StatusCode.Should().Be(200, $"Status Code {result.StatusCode}"); }