本文整理了Java中org.junit.Ignore.value()
方法的一些代码示例,展示了Ignore.value()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ignore.value()
方法的具体详情如下:
包路径:org.junit.Ignore
类名称:Ignore
方法名:value
暂无
代码示例来源:origin: stackoverflow.com
public class PrintIgnoreRunListener extends RunListener {
@Override
public void testIgnored(Description description) throws Exception {
super.testIgnored(description);
Ignore ignore = description.getAnnotation(Ignore.class);
String ignoreMessage = String.format(
"@Ignore test method '%s()': '%s'",
description.getMethodName(), ignore.value());
System.out.println(ignoreMessage);
}
}
代码示例来源:origin: apache/maven-surefire
private boolean equalValue( Ignore ignore )
{
return ignore != null && ignore.value().equals( value );
}
}
代码示例来源:origin: org.apache.maven.surefire/common-junit4
private boolean equalValue( Ignore ignore )
{
if ( ignore == null )
{
return false;
}
else
{
String val = ignore.value();
return val == null ? value == null : val.equals( value );
}
}
}
代码示例来源:origin: ru.yandex.qatools.allure/allure-cucumber-jvm-adaptor
public String
getIgnoredMessage(Description description) {
Ignore ignore = description.getAnnotation(Ignore.class
);
return ignore
== null || ignore.value()
.isEmpty() ? "Test ignored (without reason)!" : ignore.value();
}
代码示例来源:origin: org.apache.maven.surefire/common-junit4
public static String getAnnotatedIgnoreValue( Description description )
{
final Ignore ignore = getAnnotatedIgnore( description );
return ignore != null ? ignore.value() : null;
}
代码示例来源:origin: coherence-community/oracle-bedrock
public static String getIgnoredMessage(Description description)
{
String message = null;
Ignore ignore = description.getAnnotation(Ignore.class);
if (ignore != null)
{
message = ignore.value();
}
return message;
}
代码示例来源:origin: apache/maven-surefire
static String getAnnotatedIgnoreValue( Description description )
{
final Ignore ignore = getAnnotatedIgnore( description );
return ignore != null ? ignore.value() : null;
}
代码示例来源:origin: com.oracle.bedrock/bedrock-testing-support
public static String getIgnoredMessage(Description description)
{
String message = null;
Ignore ignore = description.getAnnotation(Ignore.class);
if (ignore != null)
{
message = ignore.value();
}
return message;
}
代码示例来源:origin: io.qameta.allure/allure-junit4
private StatusDetails getIgnoredMessage(final Description description) {
final Ignore ignore = description.getAnnotation(Ignore.class);
final String message = Objects.nonNull(ignore) && !ignore.value().isEmpty()
? ignore.value() : "Test ignored (without reason)!";
return new StatusDetails().setMessage(message);
}
代码示例来源:origin: org.patterntesting/patterntesting-rt
/**
* Here we handle annotations like {@code @Ignore} where the execution of
* the test method should be ignored.
*
* @param method
* the test method
* @return true or false
*/
protected final boolean shouldBeIgnored(final FrameworkMethod method) {
Ignore ignore = method.getAnnotation(Ignore.class);
if (ignore != null) {
if (LOG.isDebugEnabled()) {
String reason = ignore.value();
if (StringUtils.isNotEmpty(reason)) {
reason = " (" + reason + ")";
}
LOG.debug(this.getTestClass().getName() + "." + method.getName() + " ignored" + reason);
}
return true;
}
return this.xfilter.shouldBeIgnored(describeChild(method));
}
代码示例来源:origin: com.carrotsearch.randomizedtesting/junit4-ant
Ignore ignoreAnn = description.getAnnotation(Ignore.class);
if ((ignoreAnn = description.getAnnotation(Ignore.class)) != null) {
cause = "Annotated @Ignore(" + ignoreAnn.value() + ")";
} else {
cause = "Class annotated @Ignore(" + ignoreAnn.value() + ")";
代码示例来源:origin: randomizedtesting/randomizedtesting
Ignore ignoreAnn = description.getAnnotation(Ignore.class);
if ((ignoreAnn = description.getAnnotation(Ignore.class)) != null) {
cause = "Annotated @Ignore(" + ignoreAnn.value() + ")";
} else {
cause = "Class annotated @Ignore(" + ignoreAnn.value() + ")";
内容来源于网络,如有侵权,请联系作者删除!