Skip to content
Snippets Groups Projects
Commit 91090d03 authored by Georg Graßnick's avatar Georg Graßnick 🤔
Browse files

Fix integration tests

parent e190c353
No related branches found
No related tags found
2 merge requests!31Feat/generalresource from jar fix,!28Bug/jar resource handling 49
......@@ -14,10 +14,10 @@ import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import javax.print.DocFlavor;
import java.io.File;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.URL;
/**
* Integrationtests for the components PrintableData and Exporter.
......@@ -45,8 +45,8 @@ public class PrintableDataExporterIntegTest {
@BeforeAll
public static void setUp() {
Assertions.assertDoesNotThrow(() -> {
String correct = getResource("config/correct.properties").getAbsolutePath();
String standard = getResource("config/default.properties").getAbsolutePath();
URL correct = ClassLoader.getSystemClassLoader().getResource("config/correct.properties");
URL standard = ClassLoader.getSystemClassLoader().getResource("config/default.properties");
JavaPropertiesConfigurationParser configParser = new JavaPropertiesConfigurationParser(correct, standard);
printer = configParser.getPrinter();
printer.getProperty("brailletable").toString();
......@@ -55,11 +55,6 @@ public class PrintableDataExporterIntegTest {
});
}
public static File getResource(String fileName) {
ClassLoader classLoader = ClassLoader.getSystemClassLoader();
File resourceFile = new File(classLoader.getResource(fileName).getFile());
return resourceFile;
}
/**
* Unittest/Integrationtest for the private Print method with a Null Servive.
* Expected: Nullpointerexception.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment