Interface ExitMechanism


  • public interface ExitMechanism
    This interface allows unit tests to override the exit mechanism.
    • Method Detail

      • exit

        void exit​(int status)
        Normally, this will call System.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