Skip to content

Commit

Permalink
xml correction
Browse files Browse the repository at this point in the history
  • Loading branch information
Jochen Stärk authored and Jochen Stärk committed Feb 8, 2019
1 parent cd0569a commit 642c566
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 28 deletions.
6 changes: 3 additions & 3 deletions src/main/java/ZUV/ValidationResultItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ public String getXML() {
String additionalAttributes="";
String additionalContents="";
if (section!=-1) {
additionalAttributes+=" type='"+section+"'";
additionalAttributes+=" type=\""+section+"\"";
}
if (location!=null) {
additionalAttributes+=" location='"+location+"'";
additionalAttributes+=" location=\""+location+"\"";
}
if (criterion!=null) {
additionalAttributes+=" criterion='"+criterion+"'";
additionalAttributes+=" criterion=\""+criterion+"\"";
}
if (stacktrace!=null) {
additionalContents+="<stacktrace>"+stacktrace+"</stacktrace>";
Expand Down
6 changes: 3 additions & 3 deletions src/test/java/ZUV/PDFValidatorTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ public void testPDFValidation() {
assertEquals(true, actual.contains("batchSummary totalJobs=\"1\" failedToParse=\"0\" encrypted=\"0\""));
assertEquals(true, actual.contains("validationReports compliant=\"1\" nonCompliant=\"0\" failedJobs=\"0\">"));
// test some xml
assertEquals(true, actual.contains("<error location='/*:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:ApplicableHeaderTradeSettlement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:SpecifiedTradeSettlementHeaderMonetarySummation[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:DuePayableAmount[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]' criterion='not(@currencyID)'>[CII-DT-031] - currencyID should not be present</error>"));
// test some binary signature recognition
assertEquals(true, actual.contains("<error location=\"/*:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:SupplyChainTradeTransaction[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]/*:ApplicableHeaderTradeSettlement[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:SpecifiedTradeSettlementHeaderMonetarySummation[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]/*:DuePayableAmount[namespace-uri()='urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100'][1]\" criterion=\"not(@currencyID)\">[CII-DT-031] - currencyID should not be present</error>"));
// test some binary signature recognition
assertEquals(true, actual.contains("<version>2</version>"));

// valid one
Expand All @@ -51,7 +51,7 @@ public void testPDFValidation() {
pv.validate();
actual=pv.getXMLResult();

assertEquals(true,actual.contains("<error type='12'>XMP Metadata: ConformanceLevel contains invalid value</error>"));
assertEquals(true,actual.contains("<error type=\"12\">XMP Metadata: ConformanceLevel contains invalid value</error>"));

}

Expand Down
Loading

0 comments on commit 642c566

Please sign in to comment.