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


Java IMethodInterceptor类代码示例

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


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

示例1: hasInterceptor

import org.spockframework.runtime.extension.IMethodInterceptor; //导入依赖的package包/类
private static Matcher<MethodInfo> hasInterceptor(final IMethodInterceptor interceptor) {
	return new BaseMatcher<MethodInfo>() {
		@Override
		public void describeTo(Description description) {
			description.appendText("has interceptor ").appendText(interceptor.toString());
		}

		@Override
		public boolean matches(Object item) {
			if (item instanceof MethodInfo) {
				MethodInfo methodInfo = (MethodInfo) item;
				return methodInfo.getInterceptors().contains(interceptor);
			}
			return false;
		}
	};
}
 
开发者ID:reportportal,项目名称:agent-java-spock,代码行数:18,代码来源:ReportableRunListenerTest.java

示例2: ReportableRunListener

import org.spockframework.runtime.extension.IMethodInterceptor; //导入依赖的package包/类
@Inject
public ReportableRunListener(ISpockReporter spockReporter, IMethodInterceptor fixturesInterceptor) {
	checkArgument(spockReporter != null, "Spock reporter shouldn't be null");
	checkArgument(fixturesInterceptor != null, "Fixture interceptor shouldn't be null");

	this.spockReporter = spockReporter;
	this.fixturesInterceptor = fixturesInterceptor;
}
 
开发者ID:reportportal,项目名称:agent-java-spock,代码行数:9,代码来源:ReportableRunListener.java

示例3: visitSpec

import org.spockframework.runtime.extension.IMethodInterceptor; //导入依赖的package包/类
@Override
public void visitSpec(final SpecInfo spec) {

  IMethodInterceptor interceptor = new InjectInterceptor(spec);
  spec.addSharedInitializerInterceptor(interceptor);
  spec.addInitializerInterceptor(interceptor);
  super.visitSpec(spec);
}
 
开发者ID:eddyson-de,项目名称:tapestry-geb,代码行数:9,代码来源:JettyExtension.java

示例4: install

import org.spockframework.runtime.extension.IMethodInterceptor; //导入依赖的package包/类
public void install(List<IMethodInterceptor> interceptors) {
  if (fields.isEmpty()) return;
  interceptors.add(this);
}
 
开发者ID:robfletcher,项目名称:spock-jdbc,代码行数:5,代码来源:TruncateTablesInterceptor.java

示例5: fixturesInterceptor

import org.spockframework.runtime.extension.IMethodInterceptor; //导入依赖的package包/类
@Provides
@Singleton
IMethodInterceptor fixturesInterceptor(ISpockReporter spockReporter) {
	return new FixtureInterceptor(spockReporter);
}
 
开发者ID:reportportal,项目名称:agent-java-spock,代码行数:6,代码来源:SpockListenersModule.java


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