Skip to content

Commit

Permalink
fix(test): Meta model doesn't have to follow naming of test classes
Browse files Browse the repository at this point in the history
  • Loading branch information
pvojtechovsky committed Oct 28, 2017
1 parent c160bc9 commit 745f25a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/test/java/spoon/test/main/MainTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,11 @@ public void testTest() throws Exception {
// if one analyzes src/main/java and src/test/java at the same time
// this helps a lot to easily automatically differentiate app classes and test classes
for (CtType t : launcher.getFactory().getModel().getAllTypes()) {
if (t.getPackage().getQualifiedName().equals("spoon.metamodel")
|| t.getPackage().getQualifiedName().startsWith("spoon.generating")) {
//Meta model classes doesn't have to follow test class naming conventions
continue;
}
assertTrue(t.getQualifiedName() + " is not clearly a test class, it should contain 'test' either in its package name or class name", t.getQualifiedName().matches("(?i:.*test.*)"));
}
}
Expand Down

0 comments on commit 745f25a

Please sign in to comment.