当前位置: 首页>>代码示例>>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;未经允许,请勿转载。