File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
src/test/java/org/rrajesh1979/tool Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -61,4 +61,32 @@ void mainDecodeTest() {
6161 .execute (args );
6262 assertEquals (0 , exitCode );
6363 }
64+
65+ @ Test
66+ @ DisplayName ("Test JWTC Main" )
67+ void mainTest () {
68+ String [] args = {};
69+ System .out .println (String .join (" " , args ));
70+ CommandLine jwtcCommandLine = new CommandLine (new JWTC ());
71+ int exitCode = jwtcCommandLine
72+ .setColorScheme (JWTC .getColorScheme ())
73+ .execute (args );
74+ assertEquals (0 , exitCode );
75+ }
76+
77+ @ Test
78+ @ DisplayName ("Test JWTC Main - Invalid Command" )
79+ void mainInvalidTest () {
80+ String userInput = "{}" ;
81+
82+ String [] args = {
83+ "invalid"
84+ };
85+ System .out .println (String .join (" " , args ));
86+ CommandLine jwtcCommandLine = new CommandLine (new JWTC ());
87+ int exitCode = jwtcCommandLine
88+ .setColorScheme (JWTC .getColorScheme ())
89+ .execute (args );
90+ assertNotEquals (0 , exitCode );
91+ }
6492}
You can’t perform that action at this time.
0 commit comments