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

pkiraly / metadata-qa-marc / #1527

22 Aug 2025 02:21PM UTC coverage: 90.345%. Remained the same
#1527

push

pkiraly
Improve timeline handling

5191 of 6416 new or added lines in 219 files covered. (80.91%)

886 existing lines in 78 files now uncovered.

36717 of 40641 relevant lines covered (90.34%)

0.9 hits per line

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

40.0
/src/main/java/de/gwdg/metadataqa/marc/cli/parameters/NetworkParameters.java
1
package de.gwdg.metadataqa.marc.cli.parameters;
2

3
import org.apache.commons.cli.ParseException;
4

5
import java.io.Serializable;
6

7
public class NetworkParameters extends CommonParameters implements Serializable {
8
  public static final String DEFAULT_FILE_NAME = "validation-report.txt";
9

10
  private NetworkAction action = NetworkAction.PRIMARY;
1✔
11
  private int groupLimit = 1000;
1✔
12
  private boolean isOptionSet;
13

14
  @Override
15
  protected void setOptions() {
16
    if (!isOptionSet) {
1✔
17
      super.setOptions();
1✔
18
      options.addOption("a", "action", true, "action: 'primary' (default), 'pairing'");
1✔
19
      options.addOption("l", "group-limit", true, "pair creation limit");
1✔
20
      isOptionSet = true;
1✔
21
    }
22
  }
1✔
23

24
  public NetworkParameters() {
25
    super();
1✔
26
  }
1✔
27

28
  public NetworkParameters(String[] arguments) throws ParseException {
UNCOV
29
    super(arguments);
×
30

UNCOV
31
    if (cmd.hasOption("action")) {
×
32
      for (NetworkAction registeredAction : NetworkAction.values()) {
×
33
        if (registeredAction.getLabel().equals(cmd.getOptionValue("action"))) {
×
34
          action = registeredAction;
×
35
          break;
×
36
        }
37
      }
38
    }
39

UNCOV
40
    if (cmd.hasOption("group-limit")) {
×
41
      groupLimit = Integer.parseInt(cmd.getOptionValue("group-limit"));
×
42
    }
UNCOV
43
  }
×
44

45
  public NetworkAction getAction() {
UNCOV
46
    return action;
×
47
  }
48

49
  public int getGroupLimit() {
UNCOV
50
    return groupLimit;
×
51
  }
52

53
  @Override
54
  public String formatParameters() {
UNCOV
55
    String text = super.formatParameters();
×
56
    text += String.format("action: %s%n", action);
×
57
    text += String.format("group-limit: %d%n", groupLimit);
×
58
    return text;
×
59
  }
60
}
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