Package org.impalaframework.command.interactive

Examples of org.impalaframework.command.interactive.InteractiveTestCommand


    GlobalCommandState.getInstance().addValue(CommandStateConstants.TEST_CLASS, testClass);

    Command initCommand = getInitCommand();
    initCommand.execute(commandState);

    InteractiveTestCommand testCommand = new InteractiveTestCommand();
    StopCheckerListener stopCheckerListener = new StopCheckerListener();

    Integer maxInactiveSeconds = getMaxInactiveSeconds();

    if (maxInactiveSeconds != null) {
      stopCheckerListener.setMaxInactiveSeconds(maxInactiveSeconds);
      stopCheckerListener.start();
      testCommand.addTestListener(stopCheckerListener);
    }

    Map<String, String> aliasMap = getAliasMap();
    testCommand.setAliasMap(aliasMap);
    Map<String, Command> commandMap = getCommandMap();
    commandMap.put("usage", new UsageCommand(commandMap, aliasMap));
    testCommand.setCommandMap(commandMap);

    System.out.println("--------------------");

    while (true) {
      commandState.capture(testCommand);

      try {
        testCommand.execute(commandState);
      }
      catch (TerminatedApplicationException e) {
        break;
      }
    }
View Full Code Here


    GlobalCommandState.getInstance().addValue(CommandStateConstants.TEST_CLASS, testClass);

    Command initCommand = getInitCommand();
    initCommand.execute(commandState);

    InteractiveTestCommand testCommand = new InteractiveTestCommand();
    StopCheckerListener stopCheckerListener = new StopCheckerListener();

    Integer maxInactiveSeconds = getMaxInactiveSeconds();

    if (maxInactiveSeconds != null) {
      stopCheckerListener.setMaxInactiveSeconds(maxInactiveSeconds);
      stopCheckerListener.start();
      testCommand.addTestListener(stopCheckerListener);
    }

    Map<String, String> aliasMap = getAliasMap();
    testCommand.setAliasMap(aliasMap);
    Map<String, Command> commandMap = getCommandMap();
    commandMap.put("usage", new UsageCommand(commandMap, aliasMap));
    testCommand.setCommandMap(commandMap);

    System.out.println("--------------------");

    while (true) {
      commandState.capture(testCommand);

      try {
        testCommand.execute(commandState);
      }
      catch (TerminatedApplicationException e) {
        break;
      }
    }
View Full Code Here

TOP

Related Classes of org.impalaframework.command.interactive.InteractiveTestCommand

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.