本文整理匯總了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);
}