File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed
src/test/java/net/lamgc/utils/base/runner Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change 66import net .lamgc .utils .base .runner .exception .ParameterNoFoundException ;
77import org .junit .Assert ;
88import org .junit .Test ;
9+ import org .slf4j .LoggerFactory ;
910
11+ import java .util .Arrays ;
1012import java .util .Date ;
13+ import java .util .Set ;
1114
1215public class ArgumentsRunnerInstanceMethodTest {
1316
14- private static InstanceRunnerTestMain testMain = new InstanceRunnerTestMain ();
17+ private final static InstanceRunnerTestMain testMain = new InstanceRunnerTestMain ();
1518
1619 @ Test
1720 public void getCommandNamesTest () {
18- new ArgumentsRunner (InstanceRunnerTestMain .class ).getCommandNames ();
21+ Set <String > commandNames = new ArgumentsRunner (InstanceRunnerTestMain .class ).getCommandNames ();
22+ String [] commands = new String [commandNames .size ()];
23+ commandNames .toArray (commands );
24+ LoggerFactory .getLogger (this .getClass ().getSimpleName ()).info ("Commands: {}" , Arrays .toString (commands ));
1925 }
2026
2127 @ Test
Original file line number Diff line number Diff line change 66import net .lamgc .utils .base .runner .exception .ParameterNoFoundException ;
77import org .junit .Assert ;
88import org .junit .Test ;
9+ import org .slf4j .LoggerFactory ;
910
11+ import java .util .Arrays ;
1012import java .util .Date ;
13+ import java .util .Set ;
1114
1215public class ArgumentsRunnerStaticMethodTest {
1316
1417 @ Test
1518 public void getCommandNamesTest () {
16- new ArgumentsRunner (InstanceRunnerTestMain .class ).getCommandNames ();
19+ Set <String > commandNames = new ArgumentsRunner (StaticRunnerTestMain .class ).getCommandNames ();
20+ String [] commands = new String [commandNames .size ()];
21+ commandNames .toArray (commands );
22+ LoggerFactory .getLogger (this .getClass ().getSimpleName ()).info ("Commands: {}" , Arrays .toString (commands ));
1723 }
1824
1925 @ Test
You can’t perform that action at this time.
0 commit comments