Package org.djutils.cli
Class TestCLIHelpVersion
- java.lang.Object
-
- org.djutils.cli.TestCLIHelpVersion
-
public class TestCLIHelpVersion extends Object
Program to test the CLI.
Copyright (c) 2003-2018 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information www.simulation.tudelft.nl. The source code and binary code of this software is proprietary information of Delft University of Technology.- Author:
- Alexander Verbraeck
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTestCLIHelpVersion.Options
-
Field Summary
Fields Modifier and Type Field Description org.junit.contrib.java.lang.system.SystemOutRulesystemOutRulestore the System.out.print() information in a log.
-
Constructor Summary
Constructors Constructor Description TestCLIHelpVersion()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidtestCliHelp()Test the CliUtil "--help" option (that calls System.exit).voidtestCliVersion()Test the CliUtil "-V" option (that calls System.exit).voidtestCliWrongOption()Test the CliUtil methods with a wrong option.voidtestCliWrongValue()Test the CliUtil methods with a wrong port.
-
-
-
Method Detail
-
testCliHelp
public void testCliHelp() throws NoSuchFieldException, IllegalArgumentException, IllegalAccessException, CliExceptionTest the CliUtil "--help" option (that calls System.exit).- Throws:
CliException- on errorIllegalAccessException- on errorIllegalArgumentException- on errorNoSuchFieldException- on error
-
testCliVersion
public void testCliVersion() throws NoSuchFieldException, IllegalArgumentException, IllegalAccessException, CliExceptionTest the CliUtil "-V" option (that calls System.exit).- Throws:
CliException- on errorIllegalAccessException- on errorIllegalArgumentException- on errorNoSuchFieldException- on error
-
testCliWrongValue
public void testCliWrongValue()
Test the CliUtil methods with a wrong port.
-
testCliWrongOption
public void testCliWrongOption()
Test the CliUtil methods with a wrong option.
-
-