Annotation Interface ConfigureWireMock
Configures WireMock instance.
- Author:
- Maciej Walkowiak
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionClass<? extends WireMockConfigurationCustomizer>[]CustomizesWireMockConfigurationused byWireMockServerinstance.Class<? extends com.github.tomakehurst.wiremock.extension.Extension>[]WireMock extensions to register inWireMockServer.intPort on which WireMock server is going to listen.The name of Spring property to inject theWireMockServer.baseUrl()The location of WireMock stub files.
-
Element Details
-
name
String nameThe name of WireMock server.- Returns:
- the name of WireMock server.
-
-
-
port
int portPort on which WireMock server is going to listen.0means WireMock will pick random port.- Returns:
- WireMock server port
- Default:
- 0
-
property
String propertyThe name of Spring property to inject theWireMockServer.baseUrl()- Returns:
- the name of Spring property to inject the
WireMockServer.baseUrl()
- Default:
- ""
-
stubLocation
String stubLocationThe location of WireMock stub files. By default, stubs are resolved from classpath locationwiremock-server-name/mappings/. If provided, stubs are resolved fromstub-location/mappings/.- Returns:
- the stub location
- Default:
- ""
-
extensions
Class<? extends com.github.tomakehurst.wiremock.extension.Extension>[] extensionsWireMock extensions to register inWireMockServer.- Returns:
- the extensions
- Default:
- {}
-
configurationCustomizers
Class<? extends WireMockConfigurationCustomizer>[] configurationCustomizersCustomizesWireMockConfigurationused byWireMockServerinstance. Customizers are ordered by their natural order in this array. Each customizer must have no-arg constructor.- Returns:
- the configuration customizers classes
- Default:
- {}
-