public static class Jadler.OngoingConfiguration extends Object implements JadlerConfiguration
Modifier and Type | Method and Description |
---|---|
Jadler.OngoingConfiguration |
respondsWithDefaultContentType(String defaultContentType)
Deprecated.
use
withDefaultResponseContentType(java.lang.String) instead
Defines a default content type of every stub http response. This value will be used for all stub responses
with no specific content type defined. (see ResponseStubbing.withContentType(java.lang.String) ) |
Jadler.OngoingConfiguration |
respondsWithDefaultEncoding(Charset defaultEncoding)
Deprecated.
use
withDefaultResponseEncoding(java.nio.charset.Charset) instead
Defines a default encoding of every stub http response. This value will be used for all stub responses
with no specific encoding defined. (see ResponseStubbing.withEncoding(java.nio.charset.Charset) ) |
Jadler.OngoingConfiguration |
respondsWithDefaultHeader(String name,
String value)
Deprecated.
use
withDefaultResponseHeader(java.lang.String, java.lang.String) instead
Defines a response header that will be sent in every http stub response.
Can be called repeatedly to define more headers. |
Jadler.OngoingConfiguration |
respondsWithDefaultStatus(int defaultStatus)
Deprecated.
use
withDefaultResponseStatus(int) instead
Sets the default http response status. This value will be used for all stub responses with no
specific http status defined. (see ResponseStubbing.withStatus(int) ) |
Jadler.OngoingConfiguration |
skipsRequestsRecording()
Deprecated.
use
withRequestsRecordingDisabled() instead
Disables incoming http requests recording. Jadler mocking (verification) capabilities are implemented by storing all incoming requests (including their
bodies). This could cause troubles in some very specific testing scenarios, for further explanation jump
straight to Please note this method should be used very rarely and definitely should not be treated as a default. |
Jadler.OngoingConfiguration |
that()
Deprecated.
added just for backward compatibility reasons, does nothing but returning this ongoing
configuration instance. Use the configuration methods of this instance directly instead.
|
Jadler.OngoingConfiguration |
withDefaultResponseContentType(String defaultContentType)
Defines a default content type of every stub http response.
|
Jadler.OngoingConfiguration |
withDefaultResponseEncoding(Charset defaultEncoding)
Defines a default encoding of every stub http response.
|
Jadler.OngoingConfiguration |
withDefaultResponseHeader(String name,
String value)
Defines a response header that will be sent in every http stub response.
|
Jadler.OngoingConfiguration |
withDefaultResponseStatus(int defaultStatus)
Sets the default http response status.
|
Jadler.OngoingConfiguration |
withRequestsRecordingDisabled()
Disables incoming http requests recording.
|
@Deprecated public Jadler.OngoingConfiguration that()
@Deprecated public Jadler.OngoingConfiguration respondsWithDefaultStatus(int defaultStatus)
withDefaultResponseStatus(int)
instead
Sets the default http response status. This value will be used for all stub responses with no
specific http status defined. (see ResponseStubbing.withStatus(int)
)defaultStatus
- default http response statuspublic Jadler.OngoingConfiguration withDefaultResponseStatus(int defaultStatus)
ResponseStubbing#withStatus(int)
)withDefaultResponseStatus
in interface JadlerConfiguration
defaultStatus
- default http response status@Deprecated public Jadler.OngoingConfiguration respondsWithDefaultHeader(String name, String value)
withDefaultResponseHeader(java.lang.String, java.lang.String)
instead
Defines a response header that will be sent in every http stub response.
Can be called repeatedly to define more headers.name
- name of the headervalue
- header valuepublic Jadler.OngoingConfiguration withDefaultResponseHeader(String name, String value)
withDefaultResponseHeader
in interface JadlerConfiguration
name
- name of the headervalue
- header value@Deprecated public Jadler.OngoingConfiguration respondsWithDefaultEncoding(Charset defaultEncoding)
withDefaultResponseEncoding(java.nio.charset.Charset)
instead
Defines a default encoding of every stub http response. This value will be used for all stub responses
with no specific encoding defined. (see ResponseStubbing.withEncoding(java.nio.charset.Charset)
)defaultEncoding
- default stub response encodingpublic Jadler.OngoingConfiguration withDefaultResponseEncoding(Charset defaultEncoding)
ResponseStubbing#withEncoding(java.nio.charset.Charset)
)withDefaultResponseEncoding
in interface JadlerConfiguration
defaultEncoding
- default stub response encoding@Deprecated public Jadler.OngoingConfiguration skipsRequestsRecording()
withRequestsRecordingDisabled()
instead
Disables incoming http requests recording.
Jadler mocking (verification) capabilities are implemented by storing all incoming requests (including their
bodies). This could cause troubles in some very specific testing scenarios, for further explanation jump
straight to JadlerMocker.setRecordRequests(boolean)
.
Please note this method should be used very rarely and definitely should not be treated as a default.
JadlerMocker.setRecordRequests(boolean)
public Jadler.OngoingConfiguration withRequestsRecordingDisabled()
Disables incoming http requests recording.
Jadler mocking (verification) capabilities are implemented by storing all incoming requests (including their
bodies). This could cause troubles in some very specific testing scenarios, for further explanation jump
straight to JadlerMocker.setRecordRequests(boolean)
.
Please note this method should be used very rarely and definitely should not be treated as a default.
withRequestsRecordingDisabled
in interface JadlerConfiguration
JadlerMocker.setRecordRequests(boolean)
@Deprecated public Jadler.OngoingConfiguration respondsWithDefaultContentType(String defaultContentType)
withDefaultResponseContentType(java.lang.String)
instead
Defines a default content type of every stub http response. This value will be used for all stub responses
with no specific content type defined. (see ResponseStubbing.withContentType(java.lang.String)
)defaultContentType
- default Content-Type
header of every http stub responsepublic Jadler.OngoingConfiguration withDefaultResponseContentType(String defaultContentType)
ResponseStubbing#withContentType(java.lang.String)
)withDefaultResponseContentType
in interface JadlerConfiguration
defaultContentType
- default Content-Type
header of every http stub responseCopyright © 2016. All Rights Reserved.