public void TestMethod1() { var repo = new Hinojosa.RECOVFP.DataAccessLayer.Repositorios.Scontrol.LayoutDanfossRepositorio(); LayoutDanfossCollection sd = repo.Ejecutar("590", new DateTime(2018, 11, 1), new DateTime(2018, 11, 30)); //ShimsContext // var arr = Array. Assert.AreNotEqual(0, sd.LayoutDanfossModels.Length); }
public LayoutDanfossCollection Ejecutar(string clienteId, DateTime fechaInicio, DateTime fechaFin) { var ldanfoss = new layoutdanfoss.layoutdanfoss(); string layoutDanfossStirng = ldanfoss.Ejecutar(clienteId, fechaInicio, fechaFin, ""); //Liberamos memoria Marshal.ReleaseComObject(ldanfoss); XmlDocument xmlReader = new XmlDocument(); xmlReader.LoadXml(layoutDanfossStirng); XmlSerializer xmlSerializer = new XmlSerializer(typeof(LayoutDanfossCollection)); LayoutDanfossCollection models = (LayoutDanfossCollection)xmlSerializer.Deserialize(new XmlNodeReader(xmlReader)); return(models); }