public async Task GetAllPedido_Should_Return_Ok() { //Arrange var Pedidos = PedidoBuilder.GetPedidosTest(); //Act _mock.Setup(x => x.GetAll()).Returns(Pedidos); var result = await _controller.GetAll() 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}"); }