public Facturae Factuare_Create_Simple_Invoice_And_validate() { var fe32 = new Facturae() .AddLegalParty(true, ResidenceTypeCodeType.E, "79065414H", "HexaSystems Corporation", "HexaSystems Address", "28019", "Madrid", "Madrid", CountryType.ESP) .AddIndividualParty(false, ResidenceTypeCodeType.E, "3422357Y", "Carlos", "Mendible", "Carlos Address", "28019", "Madrid", "Madrid", CountryType.ESP) .AddInvoice((i) => { i.HeatherAndIssueData("231418", InvoiceDocumentTypeType.FC, InvoiceClassType.OO, DateTime.Now, CurrencyCodeType.EUR, LanguageCodeType.es) .AddLine(l => l.Item("Item Description", 1, 1000).AddTax(TaxTypeCodeType.Item01, 18).AddDiscount(100, "YES", 10)) .AddLine(l => l.Item("Item Description 2", 2, 100).AddTax(TaxTypeCodeType.Item01, 18)); }); Assert.IsNotNull(fe32); fe32.Validate(); Assert.IsTrue(true); TestLog.AttachXml("Facturae_3.2", fe32.ToString()); return(fe32); }
public void AttachedResources() { TestLog.WriteLine("Attached image."); TestLog.AttachImage("Image", Resources.MbUnitLogo); TestLog.WriteLine("Attached plain text."); TestLog.AttachPlainText("Plain Text", "This is some plain text.\nLalalala..."); TestLog.WriteLine("Attached XML."); TestLog.AttachXml("XML", "<life><universe><everything>42</everything></universe></life>"); TestLog.WriteLine("Attached XHTML."); TestLog.AttachXHtml("XHtml", "<p>Some <b>XHTML</b> markup.<br/>With a line break.</p>"); TestLog.WriteLine("Attached HTML."); TestLog.AttachHtml("Html", "<p>Some <b>HTML</b> markup.<br>With a line break.</p>"); TestLog.WriteLine("Attached binary data."); TestLog.Attach(new BinaryAttachment("Binary", "application/octet-stream", new byte[] { 67, 65, 66, 66, 65, 71, 69 })); TestLog.Write("Attached video."); TestLog.AttachVideo("Video", video); }