• 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

89.47
/main/src/main/java/mockit/internal/expectations/ExecutionMode.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 java.lang.reflect.Modifier.isNative;
9
import static java.lang.reflect.Modifier.isStatic;
10

11
import edu.umd.cs.findbugs.annotations.NonNull;
12
import edu.umd.cs.findbugs.annotations.Nullable;
13

14
import mockit.internal.state.TestRun;
15

16
public enum ExecutionMode {
1✔
17
    Regular {
1✔
18
        @Override
19
        boolean isNativeMethodToBeIgnored(int access) {
20
            return false;
1✔
21
        }
22

23
        @Override
24
        boolean isToExecuteRealImplementation(@Nullable Object instance) {
25
            return instance != null && !TestRun.mockFixture().isInstanceOfMockedClass(instance);
1✔
26
        }
27
    },
28

29
    Partial {
1✔
30
        @Override
31
        boolean isToExecuteRealImplementation(@Nullable Object instance) {
32
            return instance != null && !TestRun.mockFixture().isInstanceOfMockedClass(instance);
1!
33
        }
34

35
        @Override
36
        boolean isWithRealImplementation(@Nullable Object instance) {
37
            return instance == null || !TestRun.getExecutingTest().isInjectableMock(instance);
1✔
38
        }
39

40
        @Override
41
        boolean isToExecuteRealObjectOverride(@NonNull Object instance) {
42
            return true;
×
43
        }
44
    },
45

46
    PerInstance {
1✔
47
        @Override
48
        boolean isStaticMethodToBeIgnored(int access) {
49
            return isStatic(access);
1✔
50
        }
51

52
        @Override
53
        boolean isToExecuteRealImplementation(@Nullable Object instance) {
54
            return instance == null || TestRun.getExecutingTest().isUnmockedInstance(instance);
1!
55
        }
56

57
        @Override
58
        boolean isToExecuteRealObjectOverride(@NonNull Object instance) {
59
            return TestRun.getExecutingTest().isUnmockedInstance(instance);
1✔
60
        }
61
    };
62

63
    public final boolean isMethodToBeIgnored(int access) {
64
        return isStaticMethodToBeIgnored(access) || isNativeMethodToBeIgnored(access);
1✔
65
    }
66

67
    boolean isStaticMethodToBeIgnored(int access) {
68
        return false;
1✔
69
    }
70

71
    boolean isNativeMethodToBeIgnored(int access) {
72
        return isNative(access);
1✔
73
    }
74

75
    boolean isToExecuteRealImplementation(@Nullable Object instance) {
76
        return false;
×
77
    }
78

79
    boolean isWithRealImplementation(@Nullable Object instance) {
80
        return false;
1✔
81
    }
82

83
    boolean isToExecuteRealObjectOverride(@NonNull Object instance) {
84
        return false;
1✔
85
    }
86
}
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