当前位置: 首页>>代码示例>>Java>>正文


Java MethodInfo类代码示例

本文整理汇总了Java中org.spockframework.runtime.model.MethodInfo的典型用法代码示例。如果您正苦于以下问题:Java MethodInfo类的具体用法?Java MethodInfo怎么用?Java MethodInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


MethodInfo类属于org.spockframework.runtime.model包,在下文中一共展示了MethodInfo类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: findCorrespondingFeatureMethod

import org.spockframework.runtime.model.MethodInfo; //导入依赖的package包/类
private MethodInfo findCorrespondingFeatureMethod(String featureMethodName)
{
	MethodInfo methodInfo = NOT_FOUND;
	if("setup".equalsIgnoreCase(featureMethodName)) {
		return currentSpec.getSetupMethod();
	}
	if("cleanup".equalsIgnoreCase(featureMethodName)) {
		return currentSpec.getCleanupMethod();
	}
	for (FeatureInfo feature : currentSpec.getAllFeatures())
	{
		MethodInfo featureMethod = feature.getFeatureMethod();
		if (featureMethodName.equals(featureMethod.getName()))
		{
			methodInfo = featureMethod;
			break;
		}
	}
	return methodInfo;
}
 
开发者ID:gabehamilton,项目名称:jmeter-spock-sampler,代码行数:21,代码来源:SpockSpecificationFilter.java

示例2: createFixtureMatchPredicate

import org.spockframework.runtime.model.MethodInfo; //导入依赖的package包/类
private static Predicate<ReportableItemFootprint<MethodInfo>> createFixtureMatchPredicate(final MethodInfo fixture) {
	return new Predicate<ReportableItemFootprint<MethodInfo>>() {
		@Override
		public boolean apply(@Nullable ReportableItemFootprint<MethodInfo> footprint) {
			return footprint != null && fixture.equals(footprint.getItem());
		}
	};
}
 
开发者ID:reportportal,项目名称:agent-java-spock,代码行数:9,代码来源:NodeFootprint.java

示例3: shouldRun

import org.spockframework.runtime.model.MethodInfo; //导入依赖的package包/类
@Override
public boolean shouldRun(Description description)
{
	final MethodInfo featureMethod = findCorrespondingFeatureMethod(description.getMethodName());
	if (NOT_FOUND.equals(featureMethod))
	{
		return false;
	}
	return methodName.equals(featureMethod.getReflection().getName());
}
 
开发者ID:gabehamilton,项目名称:jmeter-spock-sampler,代码行数:11,代码来源:SpockSpecificationFilter.java

示例4: visitFixtureAnnotation

import org.spockframework.runtime.model.MethodInfo; //导入依赖的package包/类
@Override
public void visitFixtureAnnotation(InheritedTimeout timeout, MethodInfo fixtureMethod) {
  fixtureMethod.addInterceptor(new TimeoutInterceptor(adapt(timeout)));
}
 
开发者ID:drmaas,项目名称:ratpack-rx2,代码行数:5,代码来源:InheritedTimeoutExtension.java

示例5: findFixtureFootprint

import org.spockframework.runtime.model.MethodInfo; //导入依赖的package包/类
ReportableItemFootprint<MethodInfo> findFixtureFootprint(final MethodInfo fixture) {
	Predicate<ReportableItemFootprint<MethodInfo>> criteria = createFixtureMatchPredicate(fixture);
	return find(getFixtures(), criteria);
}
 
开发者ID:reportportal,项目名称:agent-java-spock,代码行数:5,代码来源:NodeFootprint.java

示例6: getFixtures

import org.spockframework.runtime.model.MethodInfo; //导入依赖的package包/类
private List<ReportableItemFootprint<MethodInfo>> getFixtures() {
	return newArrayList(fixtures);
}
 
开发者ID:reportportal,项目名称:agent-java-spock,代码行数:4,代码来源:NodeFootprint.java

示例7: FixtureFootprint

import org.spockframework.runtime.model.MethodInfo; //导入依赖的package包/类
FixtureFootprint(MethodInfo item, String id) {
	super(item, id);
}
 
开发者ID:reportportal,项目名称:agent-java-spock,代码行数:4,代码来源:FixtureFootprint.java

示例8: findUnpublishedFixtureFootprint

import org.spockframework.runtime.model.MethodInfo; //导入依赖的package包/类
/**
 * Find unpublished fixture footprint. It used to address an issue, when the node footprint can have multiple fixture
 * footprint, wrapping the same {@link MethodInfo}
 * 
 * @param fixture target method info
 * @return footprint
 */
ReportableItemFootprint<MethodInfo> findUnpublishedFixtureFootprint(final MethodInfo fixture) {
	Predicate<ReportableItemFootprint<MethodInfo>> criteria = and(createFixtureMatchPredicate(fixture), IS_NOT_PUBLISHED);
	return find(getFixtures(), criteria);
}
 
开发者ID:reportportal,项目名称:agent-java-spock,代码行数:12,代码来源:NodeFootprint.java


注:本文中的org.spockframework.runtime.model.MethodInfo类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。