Resolve "Force formatting"

This commit is contained in:
Andreas Penski 2020-09-03 06:02:42 +00:00
parent bc9acc3a0a
commit 69d6e55f14
45 changed files with 535 additions and 538 deletions

View file

@ -23,6 +23,7 @@ import net.sf.saxon.s9api.XPathExecutable;
public class ComputeAcceptanceActionTest {
private static final String DOESNOT_EXIST = "count(//doesnotExist) = 0";
private final ComputeAcceptanceAction action = new ComputeAcceptanceAction();
@Test
@ -103,7 +104,6 @@ public class ComputeAcceptanceActionTest {
assertThat(bag.getAcceptStatus()).isEqualTo(AcceptRecommendation.REJECT);
}
private static XPathExecutable createXpath(final String expression) {
return new ContentRepository(ResolvingMode.STRICT_RELATIVE.getStrategy(), null).createXPath(expression, new HashMap<>());
}

View file

@ -35,7 +35,6 @@ public class CreateReportActionTest {
private ContentRepository repository;
@Before
public void setup() {
this.repository = Simple.createContentRepository();

View file

@ -57,13 +57,13 @@ public class TestBagBuilder {
private static Scenario createScenario(final URI schemafile) {
try {
final ScenarioType t = new ScenarioType();
final ValidateWithXmlSchema v = new ValidateWithXmlSchema();
final ResourceType r = new ResourceType();
r.setLocation(schemafile.getRawPath());
r.setName("invoice");
v.getResource().add(r);
t.setValidateWithXmlSchema(v);
final ScenarioType t = new ScenarioType();
final ValidateWithXmlSchema v = new ValidateWithXmlSchema();
final ResourceType r = new ResourceType();
r.setLocation(schemafile.getRawPath());
r.setName("invoice");
v.getResource().add(r);
t.setValidateWithXmlSchema(v);
final Scenario scenario = new Scenario(t);
scenario.setSchema(createSchema(schemafile.toURL()));
return scenario;

View file

@ -49,7 +49,6 @@ import net.sf.saxon.s9api.XsltCompiler;
import net.sf.saxon.s9api.XsltExecutable;
import net.sf.saxon.s9api.XsltTransformer;
/**
* Testet verschiedene Saxon Security Einstellungen.
*
@ -77,7 +76,8 @@ public class SaxonSecurityTest {
transformer.setDestination(result);
transformer.transform();
// wenn der Punkt erreicht wird, sollte wenigstens, das Element evil nicht mit 'bösen' Inhalten gefüllt sein!
// wenn der Punkt erreicht wird, sollte wenigstens, das Element evil nicht mit 'bösen' Inhalten gefüllt
// sein!
if (StringUtils.isNotBlank(result.getXdmNode().getStringValue())) {
fail(String.format("Saxon configuration should prevent expansion within %s", resource));
}