Package com.github.skjolber.mockito.soap
Class SoapExtension
java.lang.Object
com.github.skjolber.mockito.soap.SoapExtension
- All Implemented Interfaces:
org.junit.jupiter.api.extension.AfterAllCallback,org.junit.jupiter.api.extension.AfterEachCallback,org.junit.jupiter.api.extension.BeforeAllCallback,org.junit.jupiter.api.extension.BeforeEachCallback,org.junit.jupiter.api.extension.Extension,org.junit.jupiter.api.extension.ParameterResolver
- Direct Known Subclasses:
SoapServiceExtension
public abstract class SoapExtension
extends Object
implements org.junit.jupiter.api.extension.ParameterResolver, org.junit.jupiter.api.extension.BeforeAllCallback, org.junit.jupiter.api.extension.AfterAllCallback, org.junit.jupiter.api.extension.BeforeEachCallback, org.junit.jupiter.api.extension.AfterEachCallback
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidassertValidAddress(String address) protected <T> voidassertValidParams(T target, Class<T> port, String address) <T> TCreate (and start) service endpoint with mock delegate.<T> TCreate (and start) service endpoint with mock delegate.<T> TCreate (and start) service endpoint with mock delegate.<T> TCreate (and start) service endpoint with mock delegate.<T> TCreate (and start) service with mock delegate and additional properties.<T> TCreate (and start) service endpoint with mock delegate.protected intproperties(Object... properties) <T> voidCreate (and start) an endpoint.abstract <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.protected static voidverifyProperties(Object... properties) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.junit.jupiter.api.extension.AfterAllCallback
afterAllMethods inherited from interface org.junit.jupiter.api.extension.AfterEachCallback
afterEachMethods inherited from interface org.junit.jupiter.api.extension.BeforeAllCallback
beforeAllMethods inherited from interface org.junit.jupiter.api.extension.BeforeEachCallback
beforeEachMethods inherited from interface org.junit.jupiter.api.extension.ParameterResolver
resolveParameter, supportsParameter
-
Constructor Details
-
SoapExtension
public SoapExtension()
-
-
Method Details
-
proxy
public <T> void proxy(T target, Class<T> port, String address, String wsdlLocation, List<String> schemaLocations) Create (and start) an endpoint.- 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 null
-
proxy
public abstract <T> void proxy(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.- 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.
-
mock
Create (and start) service endpoint with mock delegate. No schema validation.- Type Parameters:
T- class to be mocked- Parameters:
port- service classaddress- address, i.e. http://localhost:1234- Returns:
- the mockito mock to which server calls are delegated
-
mock
Create (and start) service endpoint with mock delegate. No schema validation.- Type Parameters:
T- class to be mocked- Parameters:
port- service classaddress- address, i.e. http://localhost:1234properties- additional properties, like mtom-enabled etc.- Returns:
- the mockito mock to which server calls are delegated
-
mock
Create (and start) service endpoint with mock delegate.- Type Parameters:
T- class to be mocked- Parameters:
port- service classaddress- address, i.e. http://localhost:1234wsdlLocation- wsdl location- Returns:
- the mockito mock to which server calls are delegated
-
mock
public <T> T mock(Class<T> port, String address, String wsdlLocation, Map<String, Object> properties) Create (and start) service endpoint with mock delegate.- Type Parameters:
T- class to be mocked- Parameters:
port- service classaddress- address, i.e. http://localhost:1234wsdlLocation- wsdl locationproperties- additional properties, like mtom-enabled etc.- Returns:
- the mockito mock to which server calls are delegated
-
mock
Create (and start) service endpoint with mock delegate.- Type Parameters:
T- class to be mocked- Parameters:
port- service classaddress- address, i.e. http://localhost:1234schemaLocations- schema locations- Returns:
- the mockito mock to which server calls are delegated
-
mock
public <T> T mock(Class<T> port, String address, List<String> schemaLocations, Map<String, Object> properties) Create (and start) service with mock delegate and additional properties.- Type Parameters:
T- class to be mocked- Parameters:
port- service classaddress- address, i.e. http://localhost:1234schemaLocations- schema locationsproperties- additional properties, like mtom-enabled and so- Returns:
- the mockito mock to which server calls are delegated
-
assertValidParams
-
assertValidAddress
-
parsePort
-
processProperties
-
properties
-
verifyProperties
-