本文整理汇总了Java中org.junit.runners.model.FrameworkMethod.validatePublicVoid方法的典型用法代码示例。如果您正苦于以下问题:Java FrameworkMethod.validatePublicVoid方法的具体用法?Java FrameworkMethod.validatePublicVoid怎么用?Java FrameworkMethod.validatePublicVoid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.junit.runners.model.FrameworkMethod
的用法示例。
在下文中一共展示了FrameworkMethod.validatePublicVoid方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: validateTestMethods
import org.junit.runners.model.FrameworkMethod; //导入方法依赖的package包/类
@Override
protected void validateTestMethods(List<Throwable> errors) {
List<FrameworkMethod> annotatedMethods = getTestClass().getAnnotatedMethods(Test.class);
for (FrameworkMethod annotatedMethod : annotatedMethods) {
annotatedMethod.validatePublicVoid(false, errors);
}
}
示例2: validatePublicVoidNoOrServiceContextArgMethods
import org.junit.runners.model.FrameworkMethod; //导入方法依赖的package包/类
protected void validatePublicVoidNoOrServiceContextArgMethods(Class<? extends Annotation> annotation,
boolean isStatic, List<Throwable> errors) {
List<FrameworkMethod> methods = getTestClass().getAnnotatedMethods(annotation);
for (FrameworkMethod eachTestMethod : methods) {
eachTestMethod.validatePublicVoid(isStatic, errors);
validateNoOrOneServiceContextArg(eachTestMethod, errors);
}
}
示例3: validateTestMethods
import org.junit.runners.model.FrameworkMethod; //导入方法依赖的package包/类
@Override
protected void validateTestMethods(final List<Throwable> errors) {
final List<FrameworkMethod> methods = getTestClass().getAnnotatedMethods(Test.class);
for (final FrameworkMethod method : methods) {
method.validatePublicVoid(false, errors);
method.validateNoTypeParametersOnArgs(errors);
}
}
示例4: validateTestMethods
import org.junit.runners.model.FrameworkMethod; //导入方法依赖的package包/类
@Override
protected void validateTestMethods(final List<Throwable> errors) {
final List<FrameworkMethod> methods = getTestClass().getAnnotatedMethods(Test.class);
for (final FrameworkMethod method : methods) {
final Spockito.Unroll unroll = method.getAnnotation(Spockito.Unroll.class);
if (unroll == null) {
method.validatePublicVoidNoArg(false, errors);
} else {
method.validatePublicVoid(false, errors);
method.validateNoTypeParametersOnArgs(errors);
}
}
}
示例5: validateTestMethods
import org.junit.runners.model.FrameworkMethod; //导入方法依赖的package包/类
@Override
protected void validateTestMethods(List<Throwable> errors) {
List<FrameworkMethod> methods = getTestClass().getAnnotatedMethods(Test.class);
for (FrameworkMethod method : methods) {
method.validatePublicVoid(false, errors);
if (!isNormalTest(method) && !isAsyncTest(method)) {
errors.add(new Exception("Method " + method.getName() + " can either have no parameters, or" +
"one AsyncTest parameter"));
}
}
}