• 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

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

8
import static mockit.internal.util.Utilities.containsReference;
9

10
import edu.umd.cs.findbugs.annotations.NonNull;
11

12
import java.util.List;
13

14
final class PartiallyMockedInstances {
15
    @NonNull
16
    private final List<?> dynamicMockInstancesToMatch;
17

18
    PartiallyMockedInstances(@NonNull List<?> dynamicMockInstancesToMatch) {
1✔
19
        this.dynamicMockInstancesToMatch = dynamicMockInstancesToMatch;
1✔
20
    }
1✔
21

22
    boolean isToBeMatchedOnInstance(@NonNull Object mock) {
23
        return containsReference(dynamicMockInstancesToMatch, mock);
1✔
24
    }
25

26
    boolean isDynamicMockInstanceOrClass(@NonNull Object invokedInstance, @NonNull Object invocationInstance) {
27
        if (containsReference(dynamicMockInstancesToMatch, invokedInstance)) {
1✔
28
            return true;
1✔
29
        }
30

31
        Class<?> invokedClass = invocationInstance.getClass();
1✔
32

33
        for (Object dynamicMock : dynamicMockInstancesToMatch) {
1!
34
            if (dynamicMock.getClass() == invokedClass) {
1✔
35
                return true;
1✔
36
            }
37
        }
1✔
38

39
        return false;
×
40
    }
41
}
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