private void parseAllModelsInFolder(final String pathToFolder) throws IOException { final File path = new File(pathToFolder); assertNotNull(path); Arrays.stream(path.listFiles()) .filter(file -> !file.isDirectory()) .forEach( file -> { Log.trace( String.format("Processes the following file: %s", file.getAbsolutePath()), LOG_NAME); Optional<ASTNESTMLCompilationUnit> ast = null; try { ast = parser.parse(file.getAbsolutePath()); } catch (IOException e) { throw new RuntimeException(e); } assertTrue(ast.isPresent()); }); }
@Test public void testModelWithODE() throws IOException { Optional<ASTNESTMLCompilationUnit> ast = parser.parse("src/test/resources/codegeneration/iaf_neuron_ode_module.nestml"); assertTrue(ast.isPresent()); }