Package org.wiremock.spring.internal
Class WireMockContextCustomizer
java.lang.Object
org.wiremock.spring.internal.WireMockContextCustomizer
- All Implemented Interfaces:
org.springframework.test.context.ContextCustomizer
public class WireMockContextCustomizer
extends Object
implements org.springframework.test.context.ContextCustomizer
Attaches properties with urls pointing to
WireMockServer instances to the Spring Environment.-
Constructor Summary
ConstructorsConstructorDescriptionWireMockContextCustomizer(List<ConfigureWireMock> configurations) Creates an instance ofWireMockContextCustomizer.WireMockContextCustomizer(ConfigureWireMock... configurations) Creates an instance ofWireMockContextCustomizer. -
Method Summary
Modifier and TypeMethodDescriptionvoidcustomizeContext(org.springframework.context.ConfigurableApplicationContext context, org.springframework.test.context.MergedContextConfiguration mergedConfig) booleanThe docs inContextCustomizerstates that equals and hashcode is being used for caching and needs implementation.inthashCode()
-
Constructor Details
-
WireMockContextCustomizer
Creates an instance ofWireMockContextCustomizer.- Parameters:
configurations- the configurations
-
WireMockContextCustomizer
Creates an instance ofWireMockContextCustomizer.- Parameters:
configurations- the configurations
-
-
Method Details
-
customizeContext
public void customizeContext(org.springframework.context.ConfigurableApplicationContext context, org.springframework.test.context.MergedContextConfiguration mergedConfig) - Specified by:
customizeContextin interfaceorg.springframework.test.context.ContextCustomizer
-
equals
The docs inContextCustomizerstates that equals and hashcode is being used for caching and needs implementation. The customizeContext method will not be invoked for all tests, because of caching. -
hashCode
public int hashCode()
-