diff --git a/src/test/java/de/kosit/validationtool/cmd/PrintReportActionTest.java b/src/test/java/de/kosit/validationtool/cmd/PrintReportActionTest.java index e28b7ab..2235236 100644 --- a/src/test/java/de/kosit/validationtool/cmd/PrintReportActionTest.java +++ b/src/test/java/de/kosit/validationtool/cmd/PrintReportActionTest.java @@ -22,7 +22,7 @@ package de.kosit.validationtool.cmd; import static org.assertj.core.api.Assertions.assertThat; import java.io.IOException; -import java.net.URL; +import java.net.MalformedURLException; import org.junit.After; import org.junit.Before; @@ -30,6 +30,7 @@ import org.junit.Test; import de.kosit.validationtool.api.InputFactory; import de.kosit.validationtool.impl.Helper; +import de.kosit.validationtool.impl.Helper.Simple; import de.kosit.validationtool.impl.tasks.CheckAction; /** @@ -37,7 +38,6 @@ import de.kosit.validationtool.impl.tasks.CheckAction; */ public class PrintReportActionTest { - private static final URL REPORT = SerializeReportActionTest.class.getResource("/examples/results/report.xml"); private CommandLine commandLine; @@ -45,26 +45,26 @@ public class PrintReportActionTest { @Before public void setup() throws IOException { - commandLine = new CommandLine(); - commandLine.activate(); - action = new PrintReportAction(); + this.commandLine = new CommandLine(); + this.commandLine.activate(); + this.action = new PrintReportAction(); } @After public void tearDownd() throws IOException { - commandLine.deactivate(); + this.commandLine.deactivate(); } @Test - public void testSimpleSerialize() { - CheckAction.Bag b = new CheckAction.Bag(InputFactory.read(REPORT)); - b.setReport(Helper.load(REPORT)); - assertThat(action.isSkipped(b)).isFalse(); - action.check(b); + public void testSimpleSerialize() throws MalformedURLException { + final CheckAction.Bag b = new CheckAction.Bag(InputFactory.read(Simple.SIMPLE_VALID)); + b.setReport(Helper.load(Simple.SIMPLE_VALID.toURL())); + assertThat(this.action.isSkipped(b)).isFalse(); + this.action.check(b); assertThat(b.isStopped()).isFalse(); - assertThat(commandLine.getOutput()).isNotEmpty(); - // assertThat(commandLine.getOutput()).contains(" - - - - - KoSIT POC - - 2017-09-01T13:13:59.055+02:00 - - - SHA-256 - 4exhW9EJxAbhlZLHZ3mYZ3/hWGG5e6mIpiTAlGTpQ7s= - - - /C:/Developer/source/init/eRechnung-Check/src/test/resources/examples/UBLReady/UBLReady_EU_UBL-NL_20170102_FULL.xml - - - - UBL 2.1 Invoice - urn:oasis:names:specification:ubl:schema:xsd:Invoice-2 - /invoice:Invoice - - - UBL 2.1 Invoice - resources/eRechnung/UBL-2.1/xsdrt/maindoc/UBL-Invoice-2.1.xsd - - - - - BII Rules for Invoice - resources/eRechnung/UBL-2.1/xsl/BIIRULES-UBL-T10.xsl - - - - - openPEPPOL Rules for Invoice - resources/eRechnung/UBL-2.1/xsl/OPENPEPPOL-UBL-T10.xsl - - - - - Report für eRechnung - resources/eRechnung/report.xsl - - - - - - - UBL 2.1 Invoice - resources/eRechnung/UBL-2.1/xsdrt/maindoc/UBL-Invoice-2.1.xsd - - - - - BII Rules for Invoice - resources/eRechnung/UBL-2.1/xsl/BIIRULES-UBL-T10.xsl - - - [CL-T10-R010]-Coded allowance and charge reasons SHOULD belong to the UNCL 4465 code list BII2 subset - - - - - openPEPPOL Rules for Invoice - resources/eRechnung/UBL-2.1/xsl/OPENPEPPOL-UBL-T10.xsl - - - [EUGEN-T10-R026]-A currency code element MUST have a list identifier attribute 'ISO4217'. - - - [EUGEN-T10-R041]-The VAT identifier for the supplier SHOULD be prefixed with country code for companies - with VAT registration in EU countries - - - [EUGEN-T10-R054]-A party legal entity company identifier SHOULD have a scheme identifier attribute. - - - [EUGEN-T10-R029]-An allowance charge reason code MUST have a list identifier attribute 'UNCL4465'. - - - [EUGEN-T10-R029]-An allowance charge reason code MUST have a list identifier attribute 'UNCL4465'. - - - [EUGEN-T10-R029]-An allowance charge reason code MUST have a list identifier attribute 'UNCL4465'. - - - - - - - - - Pruefbericht der KoSIT - - - -

Prüfbericht der KoSIT

-

Angaben zum geprüften Dokument

- - - - - - - - - - - - - - - - - - -
Dokument: - /C:/Developer/source/init/eRechnung-Check/src/test/resources/examples/UBLReady/UBLReady_EU_UBL-NL_20170102_FULL.xml -
Szenario: -
Zeitpunkt:1.9.2017 13:13:59
Validierungsschritte:FehlerWarnungInformation
-

Konformitätsprüfung:Das geprüfte Dokument enthält 4 Fehler / 3 - Warnungen. Es ist nicht konform zu den formalen Vorgaben. -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PosCodeCustomLevel (Level)StepText
1CL-T10-R010warning - [CL-T10-R010]-Coded allowance and charge reasons SHOULD belong to the UNCL 4465 - code list BII2 subset -
- -
2EUGEN-T10-R026error - [EUGEN-T10-R026]-A currency code element MUST have a list identifier attribute - 'ISO4217'. -
- -
3EUGEN-T10-R041warning - [EUGEN-T10-R041]-The VAT identifier for the supplier SHOULD be prefixed with - country code for companies with VAT registration in EU countries -
- -
4EUGEN-T10-R054warning - [EUGEN-T10-R054]-A party legal entity company identifier SHOULD have a scheme - identifier attribute. -
- -
5EUGEN-T10-R029error - [EUGEN-T10-R029]-An allowance charge reason code MUST have a list identifier - attribute 'UNCL4465'. -
- -
6EUGEN-T10-R029error - [EUGEN-T10-R029]-An allowance charge reason code MUST have a list identifier - attribute 'UNCL4465'. -
- -
7EUGEN-T10-R029error - [EUGEN-T10-R029]-An allowance charge reason code MUST have a list identifier - attribute 'UNCL4465'. -
- -
-

Bewertung:Es wird empfohlen das Dokument zurückzuweisen. -

-

Erstellt mit: KoSIT POC für das InstructionSet - - vom . -

- - -
-
-
-
\ No newline at end of file