Esempio n. 1
0
  @Inject
  public TestNGTestAction(
      ActionManager actionManager,
      RunClassTestAction runClassTestAction,
      RunAllTestAction runAllTestAction,
      RunClassContextTestAction runClassContextTestAction,
      RunTestXMLAction runTestXMLAction,
      KeyBindingAgent keyBinding) {

    actionManager.registerAction("TestNGActionRunClass", runClassTestAction);
    actionManager.registerAction("TestNGActionRunAll", runAllTestAction);
    actionManager.registerAction("TestNGActionRunXML", runTestXMLAction);
    actionManager.registerAction("TestNGActionRunClassContext", runClassContextTestAction);

    keyBinding
        .getGlobal()
        .addKey(new KeyBuilder().action().alt().charCode('n').build(), "TestNGActionRunAll");

    keyBinding
        .getGlobal()
        .addKey(new KeyBuilder().action().shift().charCode('n').build(), "TestNGActionRunClass");

    this.runAllTestAction = runAllTestAction;
    this.runClassContextTestAction = runClassContextTestAction;
    this.runClassTestAction = runClassTestAction;
    this.runTestXMLAction = runTestXMLAction;
  }