Skip to content

Commit

Permalink
and unit test for the Invoice
Browse files Browse the repository at this point in the history
  • Loading branch information
oriol committed Apr 8, 2022
1 parent 784fe3c commit b084ad4
Showing 1 changed file with 3 additions and 51 deletions.
54 changes: 3 additions & 51 deletions test/Invoice-unit-UBL/BR-51.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</assert>
<test>
<assert>
<description>Verify that only 4 to 6 digits is given in the card number</description>
<description>Verify that less than 10 digits is given in the card number</description>
<success>BR-51</success>
</assert>
<Invoice
Expand All @@ -26,55 +26,7 @@
</test>
<test>
<assert>
<description>Verify that only 4 to 6 digits is given in the card number</description>
<success>BR-51</success>
</assert>
<Invoice
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2">
<cac:PaymentMeans>
<cac:CardAccount>
<cbc:PrimaryAccountNumberID>1234</cbc:PrimaryAccountNumberID>
</cac:CardAccount>
</cac:PaymentMeans>
</Invoice>
</test>
<test>
<assert>
<description>Verify that only 4 to 6 digits is given in the card number</description>
<success>BR-51</success>
</assert>
<Invoice
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2">
<cac:PaymentMeans>
<cac:CardAccount>
<cbc:PrimaryAccountNumberID>12345</cbc:PrimaryAccountNumberID>
</cac:CardAccount>
</cac:PaymentMeans>
</Invoice>
</test>
<test>
<assert>
<description>Trigger error if more than 4 digits is given in the card number</description>
<error>BR-51</error>
</assert>
<Invoice
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2">
<cac:PaymentMeans>
<cac:CardAccount>
<cbc:PrimaryAccountNumberID>12345678</cbc:PrimaryAccountNumberID>
</cac:CardAccount>
</cac:PaymentMeans>
</Invoice>
</test>
<test>
<assert>
<description>Trigger error if less than 4 digits is given in the card number</description>
<description>Trigger error if more than 10 digits is given in the card number</description>
<error>BR-51</error>
</assert>
<Invoice
Expand All @@ -83,7 +35,7 @@
xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2">
<cac:PaymentMeans>
<cac:CardAccount>
<cbc:PrimaryAccountNumberID>123</cbc:PrimaryAccountNumberID>
<cbc:PrimaryAccountNumberID>12345678901</cbc:PrimaryAccountNumberID>
</cac:CardAccount>
</cac:PaymentMeans>
</Invoice>
Expand Down

0 comments on commit b084ad4

Please sign in to comment.