public async Task Issue_Test_IssueXMLV3Async() { var build = new BuildSettings(); SW.Services.Issue.Issue issue = new SW.Services.Issue.Issue(build.Url, build.User, build.Password); var xml = GetXml(build); var response = (StampResponseV3)await issue.TimbrarV3Async(xml); Assert.True(response.status == "success" && !string.IsNullOrEmpty(response.data.cfdi), "El resultado data.tfd viene vacio."); }
public void Issue_Test_45_IssueXMLV2() { var build = new BuildSettings(); SW.Services.Issue.Issue issue = new SW.Services.Issue.Issue(build.Url, build.User, build.Password); var xml = GetXml(build); var response = (StampResponseV2)issue.TimbrarV2(xml); Assert.IsTrue(response.status == "success" && !string.IsNullOrEmpty(response.data.tfd), "El resultado data.tfd viene vacio."); }
public async Task Issue_Test_StampXMLV4byTokenAsync() { var build = new BuildSettings(); SW.Services.Issue.Issue issue = new SW.Services.Issue.Issue(build.Url, build.Token); var xml = GetXml(build); var response = (StampResponseV4)await issue.TimbrarV4Async(xml); Assert.True(response.data != null, "El resultado data viene vacio."); Assert.True(!string.IsNullOrEmpty(response.data.cfdi), "El resultado data.cfdi viene vacio."); Assert.True(!string.IsNullOrEmpty(response.data.cadenaOriginalSAT), "El resultado data.cadenaOriginalSAT viene vacio."); Assert.True(!string.IsNullOrEmpty(response.data.noCertificadoSAT), "El resultado data.noCertificadoSAT viene vacio."); Assert.True(!string.IsNullOrEmpty(response.data.noCertificadoCFDI), "El resultado data.noCertificadoCFDI viene vacio."); Assert.True(!string.IsNullOrEmpty(response.data.uuid), "El resultado data.uuid viene vacio."); Assert.True(!string.IsNullOrEmpty(response.data.selloSAT), "El resultado data.selloSAT viene vacio."); Assert.True(!string.IsNullOrEmpty(response.data.selloCFDI), "El resultado data.selloCFDI viene vacio."); Assert.True(!string.IsNullOrEmpty(response.data.fechaTimbrado), "El resultado data.fechaTimbrado viene vacio."); Assert.True(!string.IsNullOrEmpty(response.data.qrCode), "El resultado data.qrCode viene vacio."); }
public async Task PDf_Test_GenerateDefault_Token() { var build = new BuildSettings(); SW.Services.Issue.Issue issue = new SW.Services.Issue.Issue(build.Url, build.Token); var xml = GetXml(build); var response = (StampResponseV2)await issue.TimbrarV2Async(xml); if (response.status == "success") { SW.Services.Pdf.Pdf pdf = new SW.Services.Pdf.Pdf(build.UrlSWServices, build.Token); var responsePdf = await pdf.GenerarPdfDeaultAsync(response.data.cfdi, build.b64Logo); Assert.True(responsePdf.data != null && responsePdf.status == "success"); } else { Assert.True(false); } }
public async Task PDf_Test_GenerateByUserAndDealer() { var build = new BuildSettings(); SW.Services.Issue.Issue issue = new SW.Services.Issue.Issue(build.Url, build.Token); var xml = GetXml(build); var response = (StampResponseV2)await issue.TimbrarV2Async(xml); if (response.status == "success") { SW.Services.Pdf.Pdf pdf = new SW.Services.Pdf.Pdf(build.UrlSWServices, build.Token); var responsePdf = await pdf.GenerarPdfAsync(response.data.cfdi, build.b64Logo, "63220604-96AB-48DC-B579-724B55DF44CA", "63220604-96AB-48DC-B579-724B55DF44CA", build.templateId); Assert.True(responsePdf.data != null && responsePdf.status == "success"); } else { Assert.True(false); } }
public async Task PDf_Test_Generate_Generic() { var build = new BuildSettings(); SW.Services.Issue.Issue issue = new SW.Services.Issue.Issue(build.Url, build.User, build.Password); var xml = GetXml(build); var response = (StampResponseV2)await issue.TimbrarV2Async(xml); if (response.status == "success") { SW.Services.Pdf.Pdf pdf = new SW.Services.Pdf.Pdf(build.Url, build.UrlSWServices, build.User, build.Password); var responsePdf = await pdf.GenerarPdfGenericAsync(response.data.cfdi, build.b64Logo, "cfdi33", null, false, "/pdf/v1/api/GeneratePdf"); Assert.True(responsePdf.data != null && responsePdf.status == "success"); } else { Assert.True(false); } }