public void TestMethod1() { var controller = new ServicesController(); var result = controller.GetFronteraAgricola();//as OkNegotiatedContentResult<List<FronteraAgricolaDto>>; //var actionResult = controller.GetFronteraAgricola(); //var result = as IList<FronteraAgricolaDto>; //Assert.IsNotNull result.Count); }
public void TestFronteraAgricola() { var controller = new ServicesController(); var result = controller.GetFronteraAgricola() as OkNegotiatedContentResult <IList <FronteraAgricolaDto> >; IList <FronteraAgricolaDto> lista = result.Content; eutility.convertirAexcel(lista, "FronteraAgricola", "c:\\FronteraAgricola.xlsx"); Assert.IsNotNull(result.Content.Count); }