Package com.github.skjolber.mockito.soap
Class SoapServerRule
java.lang.Object
org.junit.rules.ExternalResource
com.github.skjolber.mockito.soap.SoapServiceRule
com.github.skjolber.mockito.soap.SoapServerRule
- All Implemented Interfaces:
org.junit.rules.TestRule
Rule for mocking SOAP services using @JaxWsServerFactoryBean to create Servers.
Each individual service requires a separate port.
- Author:
- thomas.skjolberg@gmail.com
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidafter()protected voidassertValidAddress(String address) voiddestroy()static SoapServerRule<T> voidproxy(T target, Class<T> port, String address, String wsdlLocation, List<String> schemaLocations, Map<String, Object> properties) Create (and start) an endpoint with the given properties.voidreset()voidstart()(Re)start services.voidstop()Stop services.Methods inherited from class com.github.skjolber.mockito.soap.SoapServiceRule
assertValidParams, mock, mock, mock, mock, mock, mock, newInstance, newInstance, parsePort, processProperties, properties, proxy, verifyPropertiesMethods inherited from class org.junit.rules.ExternalResource
apply, before
-
Constructor Details
-
SoapServerRule
public SoapServerRule()
-
-
Method Details
-
newInstance
-
proxy
public <T> void proxy(T target, Class<T> port, String address, String wsdlLocation, List<String> schemaLocations, Map<String, Object> properties) Description copied from class:SoapServiceRuleCreate (and start) an endpoint with the given properties.- Specified by:
proxyin classSoapServiceRule- Type Parameters:
T- the type of the mocked class- Parameters:
target- instance calls are forwarded toport- service classaddress- address, i.e. http://localhost:1234wsdlLocation- wsdl location, or nullschemaLocations- schema locations, or nullproperties- additional properties, like mtom-enabled etc.
-
after
protected void after()- Overrides:
afterin classorg.junit.rules.ExternalResource
-
destroy
public void destroy() -
stop
public void stop()Description copied from class:SoapServiceRuleStop services.- Specified by:
stopin classSoapServiceRule
-
start
public void start()Description copied from class:SoapServiceRule(Re)start services.- Specified by:
startin classSoapServiceRule
-
reset
public void reset() -
assertValidAddress
- Overrides:
assertValidAddressin classSoapServiceRule
-