@@ -43,7 +43,7 @@ public class FeatureTest {
4343 private static Stack <String > failMessages = new Stack <>();
4444 private static final Map <String , FeatureObjectType > FILES_FEATURES_MAP = new HashMap <>();
4545 private static final List <FeatureTestResult > results ;
46- private static final String PATH_FORMAT = "src/test/resources/ test-resources/feature-tests/%s.pdf" ;
46+ private static final String PATH_FORMAT = "test-resources/feature-tests/%s.pdf" ;
4747
4848 static {
4949 FILES_FEATURES_MAP .put ("Annotations" , FeatureObjectType .ANNOTATION );
@@ -74,7 +74,7 @@ public void testFeatures() throws IOException {
7474 }
7575 }
7676 outputResults ();
77- // Assert.assertEquals("Exceptions during feature detection", 0, exceptionsCount);
77+ Assert .assertEquals ("Exceptions during feature detection" , 0 , exceptionsCount );
7878 }
7979
8080 public static void outputResults () throws IOException {
@@ -92,7 +92,8 @@ public static void outputResults() throws IOException {
9292 }
9393
9494 private void testFile (Map .Entry <String , FeatureObjectType > file ) {
95- File testFile = new File (String .format (PATH_FORMAT , file .getKey ()));
95+ File testFile = new File (this .getClass ().getResource (String .format (PATH_FORMAT , file .getKey ())).getFile ());
96+ System .out .println (testFile .getName ());
9697 FeatureExtractorConfig config ;
9798 FeatureExtractionResult gfFeatures ;
9899 try {
@@ -101,7 +102,7 @@ private void testFile(Map.Entry<String, FeatureObjectType> file) {
101102 GFModelParser gfParser = GFModelParser .createModelWithFlavour (testFile , PDFAFlavour .NO_FLAVOUR );
102103 gfFeatures = gfParser .getFeatures (config );
103104 } catch (Throwable t ) {
104- LOGGER .log (Level .WARNING , "Exception during feature processing " + t .getMessage ());
105+ LOGGER .log (Level .WARNING , "Exception during feature processing " + t .getMessage (), t );
105106 throw new RuntimeException ("greenfield exception: " + t .getMessage (), t );
106107 }
107108 }
0 commit comments