• 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

45.0
/coverageTests/src/main/java/integration/tests/ClassWithNestedClasses.java
1
/*
2
 * MIT License
3
 * Copyright (c) 2006-2025 JMockit developers
4
 * See LICENSE file for full license text.
5
 */
6
package integration.tests;
7

8
import org.slf4j.Logger;
9
import org.slf4j.LoggerFactory;
10

11
/**
12
 * The Class ClassWithNestedClasses.
13
 */
14
public class ClassWithNestedClasses {
×
15

16
    /** The logger. */
17
    private static final Logger logger = LoggerFactory.getLogger(ClassWithNestedClasses.class);
1✔
18

19
    /**
20
     * The Class NestedClass.
21
     */
22
    public static class NestedClass {
23

24
        /** The i. */
25
        private final int i;
26

27
        /**
28
         * Instantiates a new nested class.
29
         */
30
        public NestedClass() {
×
31
            i = 123;
×
32
        }
×
33

34
        /**
35
         * The Class DeeplyNestedClass.
36
         */
37
        private static final class DeeplyNestedClass {
38

39
            /**
40
             * Prints the.
41
             *
42
             * @param text
43
             *            the text
44
             */
45
            void print(String text) {
46
                logger.info(text);
×
47
            }
×
48
        }
49

50
        /**
51
         * The Class InnerClass.
52
         */
53
        private final class InnerClass {
×
54

55
            /**
56
             * Prints the.
57
             *
58
             * @param text
59
             *            the text
60
             */
61
            void print(String text) {
62
                logger.info("{}: {}", text, i);
×
63
            }
×
64
        }
65
    }
66

67
    /**
68
     * Do something.
69
     */
70
    public static void doSomething() {
71
        new NestedClass.DeeplyNestedClass().print("test");
1✔
72

73
        // Just so we have two paths:
74
        if (logger != null) {
1!
75
            logger.info("Test");
1✔
76
        }
77
    }
1✔
78

79
    /**
80
     * Method containing anonymous class.
81
     *
82
     * @param i
83
     *            the i
84
     *
85
     * @return true, if successful
86
     */
87
    public static boolean methodContainingAnonymousClass(int i) {
88
        new Cloneable() {
1✔
89
        };
90
        return i > 0;
1!
91
    }
92
}
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