openpojo
openpojo copied to clipboard
How to ignore the test class?
I'm converting unit tests from JUnit to Spock in a project that uses OpenPojo. The POJO validation test is currently in the same package as the POJOs it's testing, and it works fine in JUnit. However, with Spock, PojoClassFactory::getPojoClassesRecursively
picks up the test class itself, and thus the test fails. I can move it to a different package and it passes, but that doesn't feel right. Is there some way to have that method ignore the test class?
If you name all your test files with "Test" at the end, you can easily filter it.