Skip to content

Commit c288a99

Browse files
committed
Update TestTaxes method to support ZUGFeRD versions/profiles
Modified SavingThenReadingAppliedTradeTaxesShouldWork to accept ZUGFeRDVersion and Profile parameters for testing with different versions and profiles. Added DataRow attribute for test data. Updated expected.Save call to use new parameters.
1 parent 3b5fd97 commit c288a99

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ZUGFeRD.Test/TestTaxes.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ namespace s2industries.ZUGFeRD.Test;
66
public class TestTaxes
77
{
88
[TestMethod]
9-
public void SavingThenReadingAppliedTradeTaxesShouldWork()
9+
[DataRow(ZUGFeRDVersion.Version1, Profile.Extended)]
10+
public void SavingThenReadingAppliedTradeTaxesShouldWork(ZUGFeRDVersion version, Profile profile)
1011
{
1112
InvoiceDescriptor expected = InvoiceDescriptor.CreateInvoice("123", new DateTime(2024, 12, 5), CurrencyCodes.EUR);
1213
var lineItem = expected.AddTradeLineItem(name: "Something",
@@ -33,7 +34,7 @@ public void SavingThenReadingAppliedTradeTaxesShouldWork()
3334
expected.DuePayableAmount = expected.GrandTotalAmount;
3435

3536
using MemoryStream ms = new();
36-
expected.Save(ms);
37+
expected.Save(ms, version, profile);
3738
ms.Seek(0, SeekOrigin.Begin);
3839

3940
InvoiceDescriptor actual = InvoiceDescriptor.Load(ms);

0 commit comments

Comments
 (0)