File tree Expand file tree Collapse file tree 3 files changed +19
-8
lines changed
main/java/org/utplsql/cli
test/java/org/utplsql/cli Expand file tree Collapse file tree 3 files changed +19
-8
lines changed Original file line number Diff line number Diff line change 33import org .utplsql .cli .config .FileMapperConfig ;
44import org .utplsql .cli .config .ReporterConfig ;
55import org .utplsql .cli .config .RunCommandConfig ;
6- import picocli .CommandLine .*;
6+ import picocli .CommandLine .ArgGroup ;
7+ import picocli .CommandLine .Command ;
8+ import picocli .CommandLine .Option ;
9+ import picocli .CommandLine .Parameters ;
710
811import java .util .*;
9- import java .util .concurrent .Callable ;
1012
1113@ Command ( name = "run" , description = "run tests" )
12- public class RunPicocliCommand implements Callable < RunCommandConfig > {
14+ public class RunPicocliCommand implements ICommand {
1315
1416 @ Parameters (description = ConnectionInfo .COMMANDLINE_PARAM_DESCRIPTION )
1517 private String connectionString ;
@@ -172,9 +174,7 @@ private String[] splitOrEmpty(String value) {
172174 }
173175 }
174176
175- @ Override
176- public RunCommandConfig call () throws Exception {
177-
177+ public RunCommandConfig getRunCommandConfig () {
178178 // Prepare path elements
179179 ArrayList <String > suitePaths = new ArrayList <>();
180180 for ( String pathElem : paths ) {
@@ -227,4 +227,15 @@ else if ( logDebug ) {
227227 randomTestOrder ,
228228 randomTestOrderSeed );
229229 }
230+
231+ @ Override
232+ public int run () {
233+ RunAction action = new RunAction (getRunCommandConfig ());
234+ return action .run ();
235+ }
236+
237+ @ Override
238+ public String getCommand () {
239+ return null ;
240+ }
230241}
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ private RunCommandConfig parseForConfig( String... args ) throws Exception {
2121 List <CommandLine > parsed = cline .parse (args );
2222
2323 RunPicocliCommand runCmd = parsed .get (1 ).getCommand ();
24- return runCmd .call ();
24+ return runCmd .getRunCommandConfig ();
2525 }
2626
2727 @ Test
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ static RunCommandConfig parseRunConfig(String... args ) throws Exception {
4343 List <CommandLine > parsed = cline .parse (args );
4444
4545 RunPicocliCommand runCmd = parsed .get (1 ).getCommand ();
46- return runCmd .call ();
46+ return runCmd .getRunCommandConfig ();
4747 }
4848
4949 static RunAction createRunAction (String ... args ) throws Exception {
You can’t perform that action at this time.
0 commit comments