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

osvalda / Pitaya / 21

22 Feb 2025 12:23PM UTC coverage: 92.8% (+0.3%) from 92.46%
21

push

circleci

osvalda
PAC-014: unit tests and bug fixes

7 of 7 new or added lines in 1 file covered. (100.0%)

1 existing line in 1 file now uncovered.

232 of 250 relevant lines covered (92.8%)

0.93 hits per line

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

95.24
/src/main/java/io/github/osvalda/pitaya/models/AreaWiseCoverageObject.java
1
package io.github.osvalda.pitaya.models;
2

3
import lombok.Getter;
4

5
/**
6
 * Represents covered and uncovered endpoints of an area.
7
 *
8
 * @author Akos Osvald
9
 */
10
public class AreaWiseCoverageObject {
11

12
    @Getter
1✔
13
    private int coveredEndpoints;
14
    @Getter
1✔
15
    private int allEndpoints;
16
    @Getter
1✔
17
    private int ignoredEndpoints = 0;
18

19
    /**
20
     * Creates a new area wise coverage object with first endpoint
21
     *
22
     * @param covered how many test case cover the first endpoint
23
     */
24
    public AreaWiseCoverageObject(int covered, boolean ignored) {
1✔
25
        allEndpoints = 1;
1✔
26
        if(covered > 0) {
1✔
27
            this.coveredEndpoints = 1;
1✔
28
        }
29
        if (ignored) {
1✔
30
            ignoredEndpoints += 1;
1✔
31
        }
32
    }
1✔
33

34
    /**
35
     * Overwritten default constructor.
36
     * The first endpoint is not yet covered by any tests.
37
     */
38
    public AreaWiseCoverageObject() {
1✔
39
        allEndpoints = 1;
1✔
40
    }
1✔
41

42
    /**
43
     * Increases the number of endpoints in area and sets its coverage.
44
     *
45
     * @param covered how many test case cover the newly added endpoint
46
     */
47
    public void increaseCoverage(int covered, boolean ignored) {
48
        allEndpoints += 1;
1✔
49
        if(covered > 0) {
1✔
50
            this.coveredEndpoints += 1;
1✔
51
        }
52
        if (ignored) {
1✔
53
            ignoredEndpoints += 1;
1✔
54
        }
55
    }
1✔
56

57
    /**
58
     * Returns the number of uncovered endpoints of the area.
59
     */
60
    public int getUncoveredEndpointNum() {
61
        return allEndpoints - coveredEndpoints - ignoredEndpoints;
1✔
62
    }
63

64
    /**
65
     * Returns the number of all endpoints without the ignored
66
     */
67
    public int getAllEndpointsWithoutIgnored() {
UNCOV
68
        return allEndpoints - ignoredEndpoints;
×
69
    }
70
}
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