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

@ -44,7 +44,6 @@ import de.kosit.validationtool.impl.tasks.CheckAction;
*/
public class ExtractHtmlActionTest {
private ExtractHtmlContentAction action;
private Path tmpDirectory;

View file

@ -38,7 +38,6 @@ import de.kosit.validationtool.impl.tasks.CheckAction;
*/
public class PrintReportActionTest {
private CommandLine commandLine;
private PrintReportAction action;

View file

@ -42,7 +42,6 @@ import de.kosit.validationtool.impl.tasks.CheckAction;
*/
public class SerializeReportActionTest {
private Path tmpDirectory;
private SerializeReportAction action;
@ -70,9 +69,9 @@ public class SerializeReportActionTest {
assertThat(this.tmpDirectory.toFile().listFiles()).hasSize(1);
}
//ERPT-83
// ERPT-83
@Test
public void testName(){
public void testName() {
final String name = "some.name.with.dots";
final CheckAction.Bag b = new CheckAction.Bag(InputFactory.read("ega".getBytes(), name + ".xml"));
assertThat(b.getName()).isEqualTo(name);

View file

@ -26,7 +26,4 @@ public class SimpleConfigTest {
assertThat(result).isNotNull();
}
}

View file

@ -1,9 +1,10 @@
package de.kosit.validationtool.daemon;
import io.restassured.http.ContentType;
import static io.restassured.RestAssured.given;
import org.junit.Test;
import static io.restassured.RestAssured.given;
import io.restassured.http.ContentType;
public class GuiHandlerIT extends BaseIT {

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));
}