@@ -8,23 +8,25 @@ private import semmle.code.java.dataflow.FlowSummary
8
8
private import semmle.code.java.dataflow.internal.DataFlowPrivate
9
9
private import semmle.code.java.dataflow.TaintTracking
10
10
11
+ pragma [ nomagic]
12
+ private predicate isTestPackage ( Package p ) {
13
+ p .getName ( )
14
+ .matches ( [
15
+ "org.junit%" , "junit.%" , "org.mockito%" , "org.assertj%" ,
16
+ "com.github.tomakehurst.wiremock%" , "org.hamcrest%" , "org.springframework.test.%" ,
17
+ "org.springframework.mock.%" , "org.springframework.boot.test.%" , "reactor.test%" ,
18
+ "org.xmlunit%" , "org.testcontainers.%" , "org.opentest4j%" , "org.mockserver%" ,
19
+ "org.powermock%" , "org.skyscreamer.jsonassert%" , "org.rnorth.visibleassertions" ,
20
+ "org.openqa.selenium%" , "com.gargoylesoftware.htmlunit%" , "org.jboss.arquillian.testng%" ,
21
+ "org.testng%"
22
+ ] )
23
+ }
24
+
11
25
/**
12
26
* A test library.
13
27
*/
14
28
private class TestLibrary extends RefType {
15
- TestLibrary ( ) {
16
- this .getPackage ( )
17
- .getName ( )
18
- .matches ( [
19
- "org.junit%" , "junit.%" , "org.mockito%" , "org.assertj%" ,
20
- "com.github.tomakehurst.wiremock%" , "org.hamcrest%" , "org.springframework.test.%" ,
21
- "org.springframework.mock.%" , "org.springframework.boot.test.%" , "reactor.test%" ,
22
- "org.xmlunit%" , "org.testcontainers.%" , "org.opentest4j%" , "org.mockserver%" ,
23
- "org.powermock%" , "org.skyscreamer.jsonassert%" , "org.rnorth.visibleassertions" ,
24
- "org.openqa.selenium%" , "com.gargoylesoftware.htmlunit%" ,
25
- "org.jboss.arquillian.testng%" , "org.testng%"
26
- ] )
27
- }
29
+ TestLibrary ( ) { isTestPackage ( this .getPackage ( ) ) }
28
30
}
29
31
30
32
private string containerAsJar ( Container container ) {
0 commit comments