當前位置: 首頁>>代碼示例>>Java>>正文


Java TestResultMessage.getTestClass方法代碼示例

本文整理匯總了Java中org.testng.remote.strprotocol.TestResultMessage.getTestClass方法的典型用法代碼示例。如果您正苦於以下問題:Java TestResultMessage.getTestClass方法的具體用法?Java TestResultMessage.getTestClass怎麽用?Java TestResultMessage.getTestClass使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.testng.remote.strprotocol.TestResultMessage的用法示例。


在下文中一共展示了TestResultMessage.getTestClass方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: appendDiffChuncks

import org.testng.remote.strprotocol.TestResultMessage; //導入方法依賴的package包/類
private static boolean appendDiffChuncks(final TestResultMessage result, String s, List<Printable> printables, final Pattern pattern) {
  final Matcher matcher = pattern.matcher(s);
  if (matcher.matches()) {
    printables.add(new Chunk(matcher.group(1), ConsoleViewContentType.ERROR_OUTPUT));
    //we have an assert with expected/actual, so we parse it out and create a diff hyperlink
    DiffHyperlink link = new DiffHyperlink(matcher.group(2), matcher.group(3), null) {
      protected String getTitle() {
        //TODO should do some more farting about to find the equality assertion that failed and show that as title
        return result.getTestClass() + '#' + result.getMethod() + "() failed";
      }
    };
    //same as junit diff view
    printables.add(link);
    printables.add(new Chunk(trimStackTrace(s.substring(matcher.end(3) + 1)), ConsoleViewContentType.ERROR_OUTPUT));
    return true;
  }
  return false;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:19,代碼來源:TestProxy.java

示例2: testStarted

import org.testng.remote.strprotocol.TestResultMessage; //導入方法依賴的package包/類
public TestProxy testStarted(TestResultMessage result, boolean registerDups) {
  TestProxy classNode = getPackageClassNodeFor(result);
  TestProxy proxy = new TestProxy();
  proxy.setParent(classNode);
  proxy.setResultMessage(result);
  synchronized (started) {
    if (registerDups) {
      List<TestProxy> dups = started.get(result);
      if (dups == null) {
        dups = new ArrayList<TestProxy>();
        started.put(result, dups);
      }
      dups.add(proxy);
    }
  }
  final String testMethodDescriptor = result.getTestClass() + TestProxy.toDisplayText(result, project);
  if (startedMethods.contains(testMethodDescriptor)) {
    total++;
  }
  else {
    startedMethods.add(testMethodDescriptor);
  }
  animator.setCurrentTestCase(proxy);
  treeBuilder.addItem(classNode, proxy);
  //treeBuilder.repaintWithParents(proxy);
  count++;
  if (count > total) total = count;
  if (myLastSelected == proxy) {
    myLastSelected = null;
  }
  if (myLastSelected == null && TestConsoleProperties.TRACK_RUNNING_TEST.value(myProperties)) {
    selectTest(proxy);
  }
  return proxy;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:36,代碼來源:TestNGResults.java

示例3: valueOf

import org.testng.remote.strprotocol.TestResultMessage; //導入方法依賴的package包/類
public String valueOf(final TestResultMessage result) {
  final String description = result.getTestClass();
  if (description != null) return description;
  return TestProxy.toDisplayText(result, project);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:6,代碼來源:TestNGResultsTableModel.java


注:本文中的org.testng.remote.strprotocol.TestResultMessage.getTestClass方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。