From 756c0738fac20c34fd3057c3f38b30267f863b1e Mon Sep 17 00:00:00 2001 From: ck-993 Date: Wed, 30 Oct 2024 11:22:24 +0100 Subject: [PATCH] Added Test for ActualDeliveryDate --- ZUGFeRD-Test/XRechnungUBLTests.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/ZUGFeRD-Test/XRechnungUBLTests.cs b/ZUGFeRD-Test/XRechnungUBLTests.cs index cfa20d9..9d5b14b 100644 --- a/ZUGFeRD-Test/XRechnungUBLTests.cs +++ b/ZUGFeRD-Test/XRechnungUBLTests.cs @@ -184,6 +184,23 @@ public void TestInvoiceWithAttachment() } } // !TestInvoiceWithAttachment() + [TestMethod] + public void TestActualDeliveryDate() + { + DateTime timestamp = new DateTime(2024,08,11); + InvoiceDescriptor desc = this.InvoiceProvider.CreateInvoice(); + MemoryStream ms = new MemoryStream(); + + desc.ActualDeliveryDate = timestamp; + + desc.Save(ms, ZUGFeRDVersion.Version23, Profile.XRechnung, ZUGFeRDFormats.UBL); + ms.Seek(0, SeekOrigin.Begin); + + InvoiceDescriptor loadedInvoice = InvoiceDescriptor.Load(ms); + + // test the ActualDeliveryDate + Assert.AreEqual(timestamp, loadedInvoice.ActualDeliveryDate); + } // !TestActualDeliveryDate() [TestMethod] public void TestTaxTypes()