openpojo icon indicating copy to clipboard operation
openpojo copied to clipboard

How to ignore the test class?

Open spartanhooah opened this issue 2 years ago • 1 comments

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?

spartanhooah avatar Apr 08 '22 12:04 spartanhooah

If you name all your test files with "Test" at the end, you can easily filter it.

VarelaTechDev avatar Feb 09 '24 04:02 VarelaTechDev