|
21 | 21 | using System; |
22 | 22 | using System.Collections.Generic; |
23 | 23 | using System.Text; |
| 24 | +using static System.Runtime.InteropServices.JavaScript.JSType; |
24 | 25 |
|
25 | 26 | namespace s2industries.ZUGFeRD.Test |
26 | 27 | { |
@@ -107,6 +108,31 @@ public void TestGetVersion() |
107 | 108 | } // !TestGetVersion() |
108 | 109 |
|
109 | 110 |
|
| 111 | + [TestMethod] |
| 112 | + [DataRow(ZUGFeRDVersion.Version1, Profile.Extended)] |
| 113 | + [DataRow(ZUGFeRDVersion.Version1, Profile.XRechnung)] |
| 114 | + [DataRow(ZUGFeRDVersion.Version20, Profile.Extended)] |
| 115 | + [DataRow(ZUGFeRDVersion.Version20, Profile.XRechnung)] |
| 116 | + [DataRow(ZUGFeRDVersion.Version20, Profile.XRechnung1)] |
| 117 | + [DataRow(ZUGFeRDVersion.Version23, Profile.Extended)] |
| 118 | + [DataRow(ZUGFeRDVersion.Version23, Profile.XRechnung1)] |
| 119 | + public void UBLNonAvailability(ZUGFeRDVersion version, Profile profile) |
| 120 | + { |
| 121 | + InvoiceDescriptor desc = this.InvoiceProvider.CreateInvoice(); |
| 122 | + MemoryStream ms = new MemoryStream(); |
| 123 | + Assert.ThrowsException<UnsupportedException>(() => desc.Save(ms, version, profile, ZUGFeRDFormats.UBL)); |
| 124 | + } // !UBLNonAvailability() |
| 125 | + |
| 126 | + |
| 127 | + [TestMethod] |
| 128 | + public void UBLAvailability() |
| 129 | + { |
| 130 | + InvoiceDescriptor desc = this.InvoiceProvider.CreateInvoice(); |
| 131 | + MemoryStream ms = new MemoryStream(); |
| 132 | + desc.Save(ms, ZUGFeRDVersion.Version23, Profile.XRechnung, ZUGFeRDFormats.UBL); |
| 133 | + } // !UBLAvailability() |
| 134 | + |
| 135 | + |
110 | 136 | [TestMethod] |
111 | 137 | [DataRow(ZUGFeRDVersion.Version1, Profile.Extended)] |
112 | 138 | [DataRow(ZUGFeRDVersion.Version20, Profile.Extended)] |
|
0 commit comments