本文整理汇总了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;
}
示例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;
}
示例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);
}