• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hazendaz / jmockit1 / 496

15 Nov 2025 05:33PM UTC coverage: 72.192% (-0.008%) from 72.2%
496

push

github

web-flow
Merge pull request #412 from hazendaz/renovate/major-spring-core

Update spring core to v7 (major)

5677 of 8360 branches covered (67.91%)

Branch coverage included in aggregate %.

11922 of 16018 relevant lines covered (74.43%)

0.74 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/main/src/main/java/mockit/coverage/testRedundancy/JUnitListener.java
1
/*
2
 * MIT License
3
 * Copyright (c) 2006-2025 JMockit developers
4
 * See LICENSE file for full license text.
5
 */
6
package mockit.coverage.testRedundancy;
7

8
import edu.umd.cs.findbugs.annotations.NonNull;
9

10
import java.lang.reflect.Method;
11

12
import org.junit.runner.Description;
13
import org.junit.runner.notification.RunListener;
14

15
public final class JUnitListener extends RunListener {
16
    @NonNull
17
    private final TestCoverage testCoverage;
18

19
    public JUnitListener(@NonNull TestCoverage testCoverage) {
×
20
        this.testCoverage = testCoverage;
×
21
    }
×
22

23
    @Override
24
    public void testStarted(@NonNull Description description) {
25
        if (description.isTest()) {
×
26
            Class<?> testClass = description.getTestClass();
×
27
            String testMethodName = description.getMethodName();
×
28

29
            for (Method testMethod : testClass.getDeclaredMethods()) {
×
30
                if (testMethod.getName().equals(testMethodName)) {
×
31
                    testCoverage.setCurrentTestMethod(testMethod);
×
32
                    return;
×
33
                }
34
            }
35
        }
36
    }
×
37

38
    @Override
39
    public void testFinished(@NonNull Description description) {
40
        if (description.isTest()) {
×
41
            testCoverage.setCurrentTestMethod(null);
×
42
        }
43
    }
×
44
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc