Exemplo n.º 1
0
  /**
   * Create a default TreeItem for a test method.
   *
   * @param classNode
   * @param testResult
   * @param className
   * @return TreeItem for test method
   */
  private TreeItem createTestMethodTreeItem(
      TreeItem classNode, ApexTestResult testResult, String className) {
    TreeItem newTestMethodNode = new TreeItem(classNode, SWT.NONE);
    newTestMethodNode.setText(testResult.getMethodName());
    newTestMethodNode.setData(TREEDATA_TEST_RESULT, testResult);

    ApexCodeLocation location =
        getCodeLocationForTestMethod(
            newTestMethodNode, className, testResult.getMethodName(), testResult.getStackTrace());
    newTestMethodNode.setData(TREEDATA_CODE_LOCATION, location);

    return newTestMethodNode;
  }