Class CommandTestCase


  • public abstract class CommandTestCase
    extends ESTestCase
    A base test case for cli tools.
    • Field Detail

      • terminal

        protected final MockTerminal terminal
        The terminal that execute uses.
      • command

        protected Command command
        The last command that was executed.
    • Constructor Detail

      • CommandTestCase

        public CommandTestCase()
    • Method Detail

      • resetTerminal

        public void resetTerminal()
      • newCommand

        protected abstract Command newCommand()
        Creates a Command to test execution.
      • execute

        public java.lang.String execute​(java.lang.String... args)
                                 throws java.lang.Exception
        Runs the command with the given args. Output can be found in terminal. The command created can be found in command.
        Throws:
        java.lang.Exception