Skip to content

Commit c9de33e

Browse files
committed
fixed unit test for META-INF/services
1 parent 2e96358 commit c9de33e

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

modules/jooby-apt/src/test/java/io/jooby/apt/MvcModuleCompilerRunner.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,13 @@ private MvcModuleCompilerRunner module(boolean debug, SneakyThrows.Consumer<Joob
6363
Path services = Paths
6464
.get(classLoader.getResource("META-INF/services/" + MvcFactory.class.getName()).toURI());
6565
assertTrue(Files.exists(services));
66-
//assertEquals(factoryName, new String(Files.readAllBytes(services), StandardCharsets.UTF_8).trim());
66+
67+
List<String> clsLst = new ArrayList<String>() {{
68+
for (Class c = clazz; c != null && c != Object.class; c = c.getSuperclass()) {
69+
add(c.getName() + "$Module");
70+
}
71+
}};
72+
assertEquals(String.join("\n", clsLst), new String(Files.readAllBytes(services), StandardCharsets.UTF_8).trim());
6773

6874
consumer.accept(application);
6975
return this;

0 commit comments

Comments
 (0)