diff --git a/src/test/java/info/ebenoit/ebul/reflection/TestPackageScanner.java b/src/test/java/info/ebenoit/ebul/reflection/TestPackageScanner.java index 4082202..8b6f1dc 100644 --- a/src/test/java/info/ebenoit/ebul/reflection/TestPackageScanner.java +++ b/src/test/java/info/ebenoit/ebul/reflection/TestPackageScanner.java @@ -108,4 +108,21 @@ public class TestPackageScanner Assert.assertTrue( result.stream( ).allMatch( s -> s.startsWith( "org.junit." ) ) ); Assert.assertTrue( result.stream( ).anyMatch( s -> s.startsWith( "org.junit.experimental." ) ) ); } + + + /** + * Test: list the class names in the org package, with recursion; both JUnit's classes and the PSTest3 class should + * be in there + */ + @Test + public void testGetClassNamesMixed( ) + throws Exception + { + final PackageScanner scanner = new PackageScanner( "org" , true ); + final ArrayList< String > result = scanner.getClassNames( ); + + Assert.assertTrue( !result.isEmpty( ) ); + Assert.assertTrue( result.stream( ).anyMatch( s -> s.startsWith( "org.junit." ) ) ); + Assert.assertTrue( result.contains( "org.PSTest3" ) ); + } } diff --git a/src/test/java/org/PSTest3.java b/src/test/java/org/PSTest3.java new file mode 100644 index 0000000..1e36561 --- /dev/null +++ b/src/test/java/org/PSTest3.java @@ -0,0 +1,7 @@ +package org; + + +public class PSTest3 +{ + +}