| 1013 | public int getExitCode() { return negate ? -5 : 5; } |
| 1014 | } |
| 1015 | @Command(subcommands = ExitCodeGen.class) |
| 1016 | static class Cmd implements Callable<Integer>, IExitCodeGenerator { |
| 1017 | private final int callResult; |
| 1018 | private final int exitResult; |
| 1019 | private final int subResult; |
| 1020 | Cmd(int callResult, int exitResult, int subResult) { |
| 1021 | this.callResult = callResult; |
| 1022 | this.exitResult = exitResult; |
| 1023 | this.subResult = subResult; |
| 1024 | } |
| 1025 | public Integer call() { return callResult; } |
| 1026 | public int getExitCode() { return exitResult; } |
| 1027 | @Command public int sub() { return subResult; } |
| 1028 | } |
| 1029 | |
| 1030 | @Test |
| 1031 | public void testRunAllResolveExitCodeFromIExitCodeGenerator() { |
nothing calls this directly
no outgoing calls
no test coverage detected