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

public class SoapServerRule extends SoapServiceRule
Rule for mocking SOAP services using @JaxWsServerFactoryBean to create Servers. Each individual service requires a separate port.
Author:
thomas.skjolberg@gmail.com
  • Constructor Details

    • SoapServerRule

      public SoapServerRule()
  • Method Details

    • newInstance

      public static SoapServerRule 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: SoapServiceRule
      Create (and start) an endpoint with the given properties.
      Specified by:
      proxy in class SoapServiceRule
      Type Parameters:
      T - the type of the mocked class
      Parameters:
      target - instance calls are forwarded to
      port - service class
      address - address, i.e. http://localhost:1234
      wsdlLocation - wsdl location, or null
      schemaLocations - schema locations, or null
      properties - additional properties, like mtom-enabled etc.
    • after

      protected void after()
      Overrides:
      after in class org.junit.rules.ExternalResource
    • destroy

      public void destroy()
    • stop

      public void stop()
      Description copied from class: SoapServiceRule
      Stop services.
      Specified by:
      stop in class SoapServiceRule
    • start

      public void start()
      Description copied from class: SoapServiceRule
      (Re)start services.
      Specified by:
      start in class SoapServiceRule
    • reset

      public void reset()
    • assertValidAddress

      protected void assertValidAddress(String address)
      Overrides:
      assertValidAddress in class SoapServiceRule