Skip to content

Commit

Permalink
Adding unit test for sb type codes
Browse files Browse the repository at this point in the history
  • Loading branch information
midran committed Oct 25, 2024
1 parent 7e185b6 commit 73cdf1d
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 0 deletions.
21 changes: 21 additions & 0 deletions rules/buildconfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<testfolder>unit-UBL-GR</testfolder>
<testfolder>unit-UBL-NL</testfolder>

<!-- Billing -->
<!-- CII -->

<configuration>
Expand Down Expand Up @@ -83,4 +84,24 @@
<inherit>peppolbis-en16931-stylesheet-3.0-ubl</inherit>
</configuration>

<!-- Self-Billing -->
<!-- UBL -->

<configuration>
<identifier>peppolbis-en16931-sbbase-3.0-ubl</identifier>
<title>PEPPOL BIS Self-Billing 3.0 (Base)</title>
<file path="sch/PEPPOL-EN16931-sb-UBL.sch" infoUrl="http://docs.peppol.eu/poacc/billing/3.0/rules/{}/"/>
</configuration>

<!--
<configuration>
<identifier>peppolbis-en16931-sb-3.0-ubl-invoice</identifier>
<title>PEPPOL BIS Self-Billing 3.0 (Profile)</title>
<declaration type="xml.ubl">Invoice::urn:fdc:peppol.eu:2017:poacc:selfbilling:01:1.0#urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:selfbilling:3.0</declaration>
<inherit>ubl-invoice-2.1</inherit>
<inherit>peppolbis-en16931-cen-ubl</inherit>
<inherit>peppolbis-en16931-base-3.0-ubl</inherit>
<inherit>peppolbis-en16931-stylesheet-3.0-ubl</inherit>
</configuration> -->

</buildConfigurations>
22 changes: 22 additions & 0 deletions rules/unit-UBL-PEPPOL-SB/PEPPOL-EN16931-P0100.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<testSet xmlns="http://difi.no/xsd/vefa/validator/1.0" configuration="peppolbis-en16931-sbbase-3.0-ubl">
<assert>
<description>Verify invoice type code for Self-Billing profile</description>
<scope>PEPPOL-EN16931-P0100</scope>
</assert>
<test>
<assert>
<success>PEPPOL-EN16931-P0100</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">

<cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:selfbilling:01:1.0</cbc:ProfileID>

<cbc:InvoiceTypeCode>389</cbc:InvoiceTypeCode>

</Invoice>
</test>

</testSet>
24 changes: 24 additions & 0 deletions rules/unit-UBL-PEPPOL-SB/PEPPOL-EN16931-P0101.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<testSet xmlns="http://difi.no/xsd/vefa/validator/1.0" configuration="peppolbis-en16931-sbbase-3.0-ubl">
<assert>
<description>Verify credit note type code for Self-Billing profile</description>
<scope>PEPPOL-EN16931-P0101</scope>
</assert>
<test>
<assert>
<success>PEPPOL-EN16931-P0101</success>
</assert>
<CreditNote 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:CreditNote-2">

<cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:selfbilling:01:1.0</cbc:ProfileID>

<cbc:CreditNoteTypeCode>261</cbc:CreditNoteTypeCode>

</CreditNote>
</test>



</testSet>

0 comments on commit 73cdf1d

Please sign in to comment.