Skip to content

Commit e24e3bf

Browse files
committed
Java: Add new Mockito runner class location.
1 parent cf34dbd commit e24e3bf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

java/ql/lib/semmle/code/java/frameworks/Mockito.qll

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,11 @@ class MockitoInitedTest extends Class {
5353
MockitoInitedTest() {
5454
// Tests run with the Mockito runner.
5555
exists(RunWithAnnotation a | a = this.getAnAncestor().getAnAnnotation() |
56+
a.getRunner().(RefType).hasQualifiedName("org.mockito.junit", "MockitoJUnitRunner")
57+
or
58+
// Deprecated styles.
5659
a.getRunner().(RefType).hasQualifiedName("org.mockito.runners", "MockitoJUnitRunner")
5760
or
58-
// Deprecated style.
5961
a.getRunner().(RefType).hasQualifiedName("org.mockito.runners", "MockitoJUnit44Runner")
6062
)
6163
or

0 commit comments

Comments
 (0)