类org.junit.experimental.theories.ParametersSuppliedBy源码实例Demo

下面列出了怎么用org.junit.experimental.theories.ParametersSuppliedBy的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: bowman   文件: RestOperationsFactoryTest.java
@Theory
public void createInstantiatesObjectMapperWithNonLibraryHandlerAwareHandlerInstantiator(
	@ParametersSuppliedBy(NonLibraryHandlerTestParams.class) HandlerInstantiatorTestParams params) {

	factory.create();
	
	ArgumentCaptor<HandlerInstantiator> handlerInstantiator = ArgumentCaptor.forClass(HandlerInstantiator.class);
	verify(mapperFactory).create(handlerInstantiator.capture());
	
	Object result = params.instantiationMethod.apply(handlerInstantiator.getValue(), params.clazz);
	
	assertThat(result, instanceOf(params.clazz));
}
 
 类所在包
 类方法
 同包方法