org.mockserver.integration.server
Class AbstractClientServerIntegrationTest
java.lang.Object
org.mockserver.integration.server.AbstractClientServerIntegrationTest
- Direct Known Subclasses:
- SameJVMAbstractClientServerIntegrationTest
public abstract class AbstractClientServerIntegrationTest
- extends Object
- Author:
- jamesdbloom
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TEXT_PLAIN
public static final String TEXT_PLAIN
mockServerClient
protected static MockServerClient mockServerClient
servletContext
protected static String servletContext
headersToIgnore
protected List<String> headersToIgnore
AbstractClientServerIntegrationTest
public AbstractClientServerIntegrationTest()
expectation
public static Expectation expectation(HttpRequest httpRequest)
getMockServerPort
public abstract int getMockServerPort()
getMockServerSecurePort
public abstract int getMockServerSecurePort()
getTestServerPort
public abstract int getTestServerPort()
calculatePath
protected String calculatePath(String path)
resetServer
public void resetServer()
shouldForwardRequestInHTTP
public void shouldForwardRequestInHTTP()
shouldForwardRequestInHTTPS
public void shouldForwardRequestInHTTPS()
shouldAllowSimultaneousForwardAndResponseExpectations
public void shouldAllowSimultaneousForwardAndResponseExpectations()
shouldCallbackToSpecifiedClassWithPrecannedResponse
public void shouldCallbackToSpecifiedClassWithPrecannedResponse()
shouldReturnResponseWithOnlyBody
public void shouldReturnResponseWithOnlyBody()
shouldReturnResponseForRequestInSsl
public void shouldReturnResponseForRequestInSsl()
shouldReturnResponseForRequestNotInSsl
public void shouldReturnResponseForRequestNotInSsl()
shouldReturnMatchRequestWithBodyInUTF16
public void shouldReturnMatchRequestWithBodyInUTF16()
shouldReturnMatchRequestWithBodyInUTF16WithContentTypeHeader
public void shouldReturnMatchRequestWithBodyInUTF16WithContentTypeHeader()
shouldReturnResponseWithBodyInUTF8
public void shouldReturnResponseWithBodyInUTF8()
shouldReturnResponseWithBodyInUTF16WithContentTypeHeader
public void shouldReturnResponseWithBodyInUTF16WithContentTypeHeader()
shouldReturnResponseWithOnlyStatusCode
public void shouldReturnResponseWithOnlyStatusCode()
shouldReturnResponseByMatchingPath
public void shouldReturnResponseByMatchingPath()
shouldReturnResponseByMatchingPathExactTimes
public void shouldReturnResponseByMatchingPathExactTimes()
shouldReturnResponseWhenTimeToLiveHasNotExpired
public void shouldReturnResponseWhenTimeToLiveHasNotExpired()
shouldReturnResponseByMatchingBodyWithXPath
public void shouldReturnResponseByMatchingBodyWithXPath()
shouldReturnResponseByMatchingBodyWithXml
public void shouldReturnResponseByMatchingBodyWithXml()
shouldReturnResponseByMatchingBodyWithJson
public void shouldReturnResponseByMatchingBodyWithJson()
shouldReturnResponseByMatchingBodyWithJsonWithCharsetUTF8
public void shouldReturnResponseByMatchingBodyWithJsonWithCharsetUTF8()
shouldReturnResponseByMatchingBodyWithJsonWithContentTypeHeader
public void shouldReturnResponseByMatchingBodyWithJsonWithContentTypeHeader()
shouldReturnResponseByMatchingBodyWithJsonWithMatchType
public void shouldReturnResponseByMatchingBodyWithJsonWithMatchType()
shouldReturnResponseByMatchingBodyWithJsonSchema
public void shouldReturnResponseByMatchingBodyWithJsonSchema()
shouldReturnPDFResponseByMatchingPath
public void shouldReturnPDFResponseByMatchingPath()
throws IOException
- Throws:
IOException
shouldReturnPNGResponseByMatchingPath
public void shouldReturnPNGResponseByMatchingPath()
throws IOException
- Throws:
IOException
shouldReturnPDFResponseByMatchingBinaryPDFBody
public void shouldReturnPDFResponseByMatchingBinaryPDFBody()
throws IOException
- Throws:
IOException
shouldReturnPNGResponseByMatchingBinaryPNGBody
public void shouldReturnPNGResponseByMatchingBinaryPNGBody()
throws IOException
- Throws:
IOException
shouldReturnResponseForExpectationWithDelay
public void shouldReturnResponseForExpectationWithDelay()
shouldReturnResponseByMatchingPathAndMethod
public void shouldReturnResponseByMatchingPathAndMethod()
shouldReturnResponseByNotMatchingPathWithNotOperator
public void shouldReturnResponseByNotMatchingPathWithNotOperator()
shouldReturnResponseByNotMatchingMethodWithNotOperator
public void shouldReturnResponseByNotMatchingMethodWithNotOperator()
shouldReturnResponseByMatchingPathAndMethodAndBody
public void shouldReturnResponseByMatchingPathAndMethodAndBody()
shouldReturnResponseByMatchingPathAndMethodAndQueryStringParameters
public void shouldReturnResponseByMatchingPathAndMethodAndQueryStringParameters()
shouldReturnResponseByMatchingPathAndMethodAndHeaders
public void shouldReturnResponseByMatchingPathAndMethodAndHeaders()
shouldReturnResponseByMatchingPathAndMethodAndCookies
public void shouldReturnResponseByMatchingPathAndMethodAndCookies()
shouldReturnResponseByMatchingPathAndMethodAndQueryStringParametersAndBodyParameters
public void shouldReturnResponseByMatchingPathAndMethodAndQueryStringParametersAndBodyParameters()
shouldReturnResponseByMatchingPathAndMethodAndQueryStringParametersAndBody
public void shouldReturnResponseByMatchingPathAndMethodAndQueryStringParametersAndBody()
shouldReturnResponseByMatchingPathAndMethodAndBodyParameters
public void shouldReturnResponseByMatchingPathAndMethodAndBodyParameters()
shouldReturnResponseByMatchingPathAndMethodAndParametersAndHeadersAndCookies
public void shouldReturnResponseByMatchingPathAndMethodAndParametersAndHeadersAndCookies()
shouldReturnResponseByNotMatchingBodyParameterWithNotOperatorForNameAndValue
public void shouldReturnResponseByNotMatchingBodyParameterWithNotOperatorForNameAndValue()
shouldReturnResponseByNotMatchingBodyParameterWithNotOperatorForName
public void shouldReturnResponseByNotMatchingBodyParameterWithNotOperatorForName()
shouldReturnResponseByNotMatchingBodyParameterWithNotOperatorForValue
public void shouldReturnResponseByNotMatchingBodyParameterWithNotOperatorForValue()
shouldReturnResponseByNotMatchingQueryStringParameterWithNotOperatorForNameAndValue
public void shouldReturnResponseByNotMatchingQueryStringParameterWithNotOperatorForNameAndValue()
shouldReturnResponseByNotMatchingQueryStringParameterWithNotOperatorForName
public void shouldReturnResponseByNotMatchingQueryStringParameterWithNotOperatorForName()
shouldReturnResponseByNotMatchingQueryStringParameterWithNotOperatorForValue
public void shouldReturnResponseByNotMatchingQueryStringParameterWithNotOperatorForValue()
shouldReturnResponseByNotMatchingCookieWithNotOperatorForNameAndValue
public void shouldReturnResponseByNotMatchingCookieWithNotOperatorForNameAndValue()
shouldReturnResponseByNotMatchingCookieWithNotOperatorForName
public void shouldReturnResponseByNotMatchingCookieWithNotOperatorForName()
shouldReturnResponseByNotMatchingCookieWithNotOperatorForValue
public void shouldReturnResponseByNotMatchingCookieWithNotOperatorForValue()
shouldReturnResponseByNotMatchingHeaderWithNotOperatorForNameAndValue
public void shouldReturnResponseByNotMatchingHeaderWithNotOperatorForNameAndValue()
shouldReturnResponseByNotMatchingHeaderWithNotOperatorForName
public void shouldReturnResponseByNotMatchingHeaderWithNotOperatorForName()
shouldReturnResponseByNotMatchingHeaderWithNotOperatorForValue
public void shouldReturnResponseByNotMatchingHeaderWithNotOperatorForValue()
shouldNotReturnResponseForWhenTimeToLiveExpired
public void shouldNotReturnResponseForWhenTimeToLiveExpired()
shouldNotReturnResponseForNonMatchingBody
public void shouldNotReturnResponseForNonMatchingBody()
shouldNotReturnResponseForMatchingBodyWithNotOperator
public void shouldNotReturnResponseForMatchingBodyWithNotOperator()
shouldNotReturnResponseForNonMatchingXPathBody
public void shouldNotReturnResponseForNonMatchingXPathBody()
shouldNotReturnResponseForNonMatchingXmlBody
public void shouldNotReturnResponseForNonMatchingXmlBody()
shouldNotReturnResponseForNonMatchingJsonBody
public void shouldNotReturnResponseForNonMatchingJsonBody()
shouldNotReturnResponseForNonMatchingJsonBodyWithMatchType
public void shouldNotReturnResponseForNonMatchingJsonBodyWithMatchType()
shouldNotReturnResponseForNonMatchingJsonSchema
public void shouldNotReturnResponseForNonMatchingJsonSchema()
shouldNotReturnResponseForNonMatchingPath
public void shouldNotReturnResponseForNonMatchingPath()
shouldNotReturnResponseForMatchingPathWithNotOperator
public void shouldNotReturnResponseForMatchingPathWithNotOperator()
shouldNotReturnResponseForMatchingMethodWithNotOperator
public void shouldNotReturnResponseForMatchingMethodWithNotOperator()
shouldNotReturnResponseForNonMatchingBodyParameterName
public void shouldNotReturnResponseForNonMatchingBodyParameterName()
shouldNotReturnResponseForMatchingBodyParameterWithNotOperator
public void shouldNotReturnResponseForMatchingBodyParameterWithNotOperator()
shouldNotReturnResponseForNonMatchingBodyParameterValue
public void shouldNotReturnResponseForNonMatchingBodyParameterValue()
shouldNotReturnResponseForNonMatchingQueryStringParameterName
public void shouldNotReturnResponseForNonMatchingQueryStringParameterName()
shouldNotReturnResponseForNonMatchingQueryStringParameterValue
public void shouldNotReturnResponseForNonMatchingQueryStringParameterValue()
shouldNotReturnResponseForMatchingQueryStringParameterWithNotOperator
public void shouldNotReturnResponseForMatchingQueryStringParameterWithNotOperator()
shouldNotReturnResponseForNonMatchingCookieName
public void shouldNotReturnResponseForNonMatchingCookieName()
shouldNotReturnResponseForNonMatchingCookieValue
public void shouldNotReturnResponseForNonMatchingCookieValue()
shouldNotReturnResponseForMatchingCookieWithNotOperator
public void shouldNotReturnResponseForMatchingCookieWithNotOperator()
shouldNotReturnResponseForNonMatchingHeaderName
public void shouldNotReturnResponseForNonMatchingHeaderName()
shouldNotReturnResponseForNonMatchingHeaderValue
public void shouldNotReturnResponseForNonMatchingHeaderValue()
shouldNotReturnResponseForMatchingHeaderWithNotOperator
public void shouldNotReturnResponseForMatchingHeaderWithNotOperator()
shouldVerifyReceivedRequests
public void shouldVerifyReceivedRequests()
shouldVerifyReceivedRequestInSsl
public void shouldVerifyReceivedRequestInSsl()
shouldVerifyReceivedRequestsWithNoBody
public void shouldVerifyReceivedRequestsWithNoBody()
shouldVerifyNotEnoughRequestsReceived
public void shouldVerifyNotEnoughRequestsReceived()
shouldVerifyTooManyRequestsReceived
public void shouldVerifyTooManyRequestsReceived()
shouldVerifyNoMatchingRequestsReceived
public void shouldVerifyNoMatchingRequestsReceived()
shouldVerifyNoRequestsReceived
public void shouldVerifyNoRequestsReceived()
shouldNotVerifyNoRequestsReceived
public void shouldNotVerifyNoRequestsReceived()
shouldVerifyNoMatchingRequestsReceivedInSsl
public void shouldVerifyNoMatchingRequestsReceivedInSsl()
shouldVerifySequenceOfRequestsReceived
public void shouldVerifySequenceOfRequestsReceived()
shouldVerifySequenceOfRequestsReceivedIncludingThoseNotMatchingAnException
public void shouldVerifySequenceOfRequestsReceivedIncludingThoseNotMatchingAnException()
shouldRetrieveSequenceOfRequestsReceivedIncludingThoseNotMatchingAnException
public void shouldRetrieveSequenceOfRequestsReceivedIncludingThoseNotMatchingAnException()
shouldRetrieveSequenceOfExpectationsSetup
public void shouldRetrieveSequenceOfExpectationsSetup()
shouldVerifySequenceOfRequestsNotReceived
public void shouldVerifySequenceOfRequestsNotReceived()
shouldClearExpectations
public void shouldClearExpectations()
shouldClearAllExpectationsWithNull
public void shouldClearAllExpectationsWithNull()
shouldClearAllExpectationsWithEmptyRequest
public void shouldClearAllExpectationsWithEmptyRequest()
shouldClearExpectationsWithXPathBody
public void shouldClearExpectationsWithXPathBody()
shouldClearExpectationsWithJsonSchemaBody
public void shouldClearExpectationsWithJsonSchemaBody()
shouldClearExpectationsWithParameterBody
public void shouldClearExpectationsWithParameterBody()
shouldReset
public void shouldReset()
shouldEnsureThatRequestDelaysDoNotAffectOtherRequests
public void shouldEnsureThatRequestDelaysDoNotAffectOtherRequests()
throws Exception
- Throws:
Exception
verifyRequestMatches
protected void verifyRequestMatches(HttpRequest[] httpRequests,
HttpRequest... httpRequestMatchers)
makeRequest
protected HttpResponse makeRequest(HttpRequest httpRequest)
makeRequest
protected HttpResponse makeRequest(HttpRequest httpRequest,
Collection<String> headersToIgnore)
Copyright © 2016. All rights reserved.