org.junit.experimental.theories.ParametersSuppliedBy Java Examples

The following examples show how to use org.junit.experimental.theories.ParametersSuppliedBy. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RestOperationsFactoryTest.java    From bowman with Apache License 2.0 3 votes vote down vote up
@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));
}