本文整理了Java中org.testng.annotations.Test.description()
方法的一些代码示例,展示了Test.description()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Test.description()
方法的具体详情如下:
包路径:org.testng.annotations.Test
类名称:Test
方法名:description
暂无
代码示例来源:origin: org.testng/testng
result.setAlwaysRun(test.alwaysRun());
result.setDescription(
findInherited(test.description(), cls, Test.class, "description", DEFAULT_STRING));
result.setExpectedExceptions(test.expectedExceptions());
result.setExpectedExceptionsMessageRegExp(test.expectedExceptionsMessageRegExp());
代码示例来源:origin: cbeust/testng
result.setAlwaysRun(test.alwaysRun());
result.setDescription(
findInherited(test.description(), cls, Test.class, "description", DEFAULT_STRING));
result.setExpectedExceptions(test.expectedExceptions());
result.setExpectedExceptionsMessageRegExp(test.expectedExceptionsMessageRegExp());
代码示例来源:origin: org.javamoney/javamoney-tck
@Override
public void onTestSkipped(ITestResult tr) {
skipped++;
count++;
String location = tr.getTestClass().getRealClass().getSimpleName() + '#' + tr.getMethod().getMethodName();
try {
Method realTestMethod = tr.getMethod().getMethod();
Test specAssert = realTestMethod.getAnnotation(Test.class);
if (specAssert != null && specAssert.description() != null && !specAssert.description().isEmpty()) {
log("[SKIPPED] " + specAssert.description() + "(" + location + ")");
} else {
log("[SKIPPED] " + location);
}
} catch (IOException e) {
throw new IllegalStateException("IO Error", e);
}
}
代码示例来源:origin: org.javamoney/javamoney-tck
@Override
public void onTestSuccess(ITestResult tr) {
success++;
count++;
String location = tr.getTestClass().getRealClass().getSimpleName() + '#' + tr.getMethod().getMethodName();
try {
Method realTestMethod = tr.getMethod().getMethod();
Test specAssert = realTestMethod.getAnnotation(Test.class);
if (specAssert != null && specAssert.description() != null && !specAssert.description().isEmpty()) {
log("[SUCCESS] " + specAssert.description() + "(" + location + ")");
} else {
log("[SUCCESS] " + location);
}
} catch (IOException e) {
throw new IllegalStateException("IO Error", e);
}
}
代码示例来源:origin: org.javamoney/javamoney-tck
Method realTestMethod = tr.getMethod().getMethod();
Test testAnnot = realTestMethod.getAnnotation(Test.class);
if (testAnnot != null && testAnnot.description() != null && !testAnnot.description().isEmpty()) {
if (tr.getThrowable() != null) {
StringWriter sw = new StringWriter();
tr.getThrowable().printStackTrace(w);
w.flush();
log("[FAILED] " + testAnnot.description() + "(" + location + "):\n" + sw.toString());
} else {
log("[FAILED] " + testAnnot.description() + "(" + location + ")");
代码示例来源:origin: org.w3/ldp-testsuite
resource.addProperty(DCTerms.date, date);
resource.addProperty(RDFS.comment, test.description());
if (allGroups != null)
resource.addProperty(DCTerms.subject, allGroups);
if (test.description() != null && test.description().length() > 0) {
Resource excerpt = model.createResource(TestDescription.Excerpt);
excerpt.addLiteral(TestDescription.includesText, test.description());
if (specRef != null) {
excerpt.addProperty(RDFS.seeAlso, specRef);
代码示例来源:origin: org.w3/ldp-testsuite
html.br().b().write("Description: ")._b().write(test.description());
html.br().b().write("Specification Section: ")._b()
.a(href(testLdp.specRefUri()))
内容来源于网络,如有侵权,请联系作者删除!