Package scanner - test for "mixed" (JAR + local files) loading
This commit is contained in:
parent
1f16faa61b
commit
5b3d927aae
2 changed files with 24 additions and 0 deletions
|
@ -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" ) );
|
||||
}
|
||||
}
|
||||
|
|
7
src/test/java/org/PSTest3.java
Normal file
7
src/test/java/org/PSTest3.java
Normal file
|
@ -0,0 +1,7 @@
|
|||
package org;
|
||||
|
||||
|
||||
public class PSTest3
|
||||
{
|
||||
|
||||
}
|
Loading…
Reference in a new issue