Annotation Type TestHttpClient
@Retention(RUNTIME)
@Target({FIELD,PARAMETER,ANNOTATION_TYPE})
@Documented
@Inherited
public @interface TestHttpClient
Annotation that can be used to inject simple http
client to query embedded server.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
The default implementation, that just returns the default configuration. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionClass<? extends HttpClientConfigurationFactory>
A configuration factory to use to create configuration for given HTTP Client.Get strategy to use to build http client.
-
Element Details
-
strategy
HttpClientStrategy strategyGet strategy to use to build http client. Default isHttpClientStrategy.AUTO
and classpath detection will be used to instantiate appropriate client implementation.- Returns:
- Strategy, default is
HttpClientStrategy.AUTO
.
- Default:
- AUTO
-
configuration
Class<? extends HttpClientConfigurationFactory> configurationA configuration factory to use to create configuration for given HTTP Client.- Returns:
- The HTTP Client configuration factory.
- Default:
- com.github.mjeanroy.junit.servers.annotations.TestHttpClient.DefaultHttpClientConfigurationFactory.class
-