@Override protected void setUp() { emptyScreener = new ClassScreener(); particularClassScreener = new ClassScreener(); particularClassScreener.addAllowedClass(SOME_CLASS); particularPackageScreener = new ClassScreener(); particularPackageScreener.addAllowedPackage(FOOBAR_PACKAGE); particularPackageScreener2 = new ClassScreener(); particularPackageScreener2.addAllowedPackage(FOOBAR_PACKAGE_WITH_TRAILING_DOT); }
public void testParticularClassScreener() { Assert.assertTrue(particularClassScreener.matches(SOME_CLASS_FILENAME)); Assert.assertFalse(particularClassScreener.matches(SOME_OTHER_CLASS_FILENAME)); Assert.assertFalse(particularClassScreener.matches(UNRELATED_THING_CLASS_FILENAME)); Assert.assertTrue(particularClassScreener.matches(SOME_CLASS_JARFILENAME)); Assert.assertFalse(particularClassScreener.matches(SOME_OTHER_CLASS_JARFILENAME)); Assert.assertFalse(particularClassScreener.matches(UNRELATED_THING_CLASS_JARFILENAME)); }