public void GenerateComprobantePagosTest() { var _testPago = GenerateComprobantePago.GenerateNew(); _testPago.LugarExpedicion = "99100"; _testPago.noCertificado = "20001000000300022815"; _testPago.UsoCFDI = "G01"; _testPago.Emisor = new BindingModels.Emisor() { Nombre = "Juan perez", RegimenFiscal = "612", RFC = "LAN7008173R5" }; _testPago.Receptor = new BindingModels.Receptor() { Nombre = "Pepe perez", RFC = "AAA010101AAA" }; _testPago.Pagos = new Pagos() { ListaPagos = new List <Pago>() { new Pago() { TipoCadPago = null, FechaPago = DateTimeOffset.Parse("2017-01-03T12:11:09"), FormaDePagoP = "01", MonedaP = "MXN", Monto = 4500, NumOperation = "01", ListaDocumentos = new List <DoctosRelacionados>() { new DoctosRelacionados() { NumParcialidad = 1, MetodoDePagoDR = "01", idDocumento = Guid.NewGuid(), Folio = 10, Serie = "AAA", ImpPagado = 4500, MonedaDR = "MXN" } } } } }; var cfdiController = new CFDIv33(_MockRepository, _moqSatProvider); var xmlComprobante = cfdiController.CreateCFDI(_testPago); Assert.IsNotNull(_testPago); }
public void CreateCFDITest() { try { var cfdiController = new CFDIv33(_MockRepository, _moqSatProvider); var xmlComprobante = cfdiController.CreateCFDI(_testComprobante); Assert.IsTrue(!String.IsNullOrEmpty(xmlComprobante)); } catch (Exception) { Assert.Fail(); } }
public void CreateCFDITest() { try { var cfdiController = new CFDIv33(_MockRepository, _moqSatProvider); var xmlComprobante = cfdiController.CreateCFDI(_testComprobante); File.WriteAllText(String.Format(@"..\\..\\Resources\\{0}.xml", DateTime.Now.ToString("ddMMyyyy")), xmlComprobante); Assert.IsTrue(!String.IsNullOrEmpty(xmlComprobante)); } catch (Exception) { Assert.Fail(); } }