In our project, we have needed a little bit more complicated filter conditions than it offers. Afters studying ClassPathSuite and Google Guava internals, I just figure out, some kind of more flexible ClassPathSuite can be created using Guava
Predicate
and ClassPath
classes. So I have coded just one core file, GuavaClassPathSuite
which does what we need - scans the class path for JUnit tests and filter them by user defined Predicates. I have pushed the solution to GitHub as gcpsuite, Guava ClassPath Suite, project. (Not very distinct name, but points to the Guava ClassPath
).
Either use it as a library, or simply copy&paste the GuavaClassPathSuite.java
, write your predicates and enjoy!
Žádné komentáře:
Okomentovat