Package pro.johndunlap.getopt
Interface ExitMechanism
-
public interface ExitMechanismThis interface allows unit tests to override the exit mechanism.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidexit(int status)Normally, this will callSystem.exit(int).
-
-
-
Method Detail
-
exit
void exit(int status)
Normally, this will callSystem.exit(int). However, in unit tests this can be overridden to throw an exception so that the test can verify that the correct exit status was used.- Parameters:
status- The status to exit with
-
-