Class Jadler.OngoingConfiguration
- java.lang.Object
-
- net.jadler.Jadler.OngoingConfiguration
-
- All Implemented Interfaces:
JadlerConfiguration
- Enclosing class:
- Jadler
public static class Jadler.OngoingConfiguration extends Object implements JadlerConfiguration
This class serves as a DSL support for additional Jadler configuration.
-
-
Method Summary
-
-
-
Method Detail
-
that
@Deprecated public 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.- Returns:
- this ongoing configuration
-
respondsWithDefaultStatus
@Deprecated public Jadler.OngoingConfiguration respondsWithDefaultStatus(int defaultStatus)
Deprecated.usewithDefaultResponseStatus(int)insteadSets the default http response status. This value will be used for all stub responses with no specific http status defined. (see
ResponseStubbing.withStatus(int))- Parameters:
defaultStatus- default http response status- Returns:
- this ongoing configuration
-
withDefaultResponseStatus
public Jadler.OngoingConfiguration withDefaultResponseStatus(int defaultStatus)
Sets the default http response status. This value will be used for all stub responses with no specific http status defined. (seeResponseStubbing.withStatus(int))- Specified by:
withDefaultResponseStatusin interfaceJadlerConfiguration- Parameters:
defaultStatus- default http response status- Returns:
- this ongoing configuration
-
respondsWithDefaultHeader
@Deprecated public Jadler.OngoingConfiguration respondsWithDefaultHeader(String name, String value)
Deprecated.usewithDefaultResponseHeader(java.lang.String, java.lang.String)insteadDefines a response header that will be sent in every http stub response. Can be called repeatedly to define more headers.
- Parameters:
name- name of the headervalue- header value- Returns:
- this ongoing configuration
-
withDefaultResponseHeader
public Jadler.OngoingConfiguration withDefaultResponseHeader(String name, String value)
Defines a response header that will be sent in every http stub response. Can be called repeatedly to define more headers.- Specified by:
withDefaultResponseHeaderin interfaceJadlerConfiguration- Parameters:
name- name of the headervalue- header value- Returns:
- this ongoing configuration
-
respondsWithDefaultEncoding
@Deprecated public Jadler.OngoingConfiguration respondsWithDefaultEncoding(Charset defaultEncoding)
Deprecated.usewithDefaultResponseEncoding(java.nio.charset.Charset)insteadDefines 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))- Parameters:
defaultEncoding- default stub response encoding- Returns:
- this ongoing configuration
-
withDefaultResponseEncoding
public Jadler.OngoingConfiguration withDefaultResponseEncoding(Charset defaultEncoding)
Defines a default encoding of every stub http response. This value will be used for all stub responses with no specific encoding defined (seeResponseStubbing.withEncoding(java.nio.charset.Charset)).- Specified by:
withDefaultResponseEncodingin interfaceJadlerConfiguration- Parameters:
defaultEncoding- default stub response encoding- Returns:
- this ongoing configuration
-
skipsRequestsRecording
@Deprecated public Jadler.OngoingConfiguration skipsRequestsRecording()
Deprecated.usewithRequestsRecordingDisabled()insteadDisables 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.
- Returns:
- this ongoing configuration
- See Also:
JadlerMocker.setRecordRequests(boolean)
-
withRequestsRecordingDisabled
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.
- Specified by:
withRequestsRecordingDisabledin interfaceJadlerConfiguration- Returns:
- this ongoing configuration
- See Also:
JadlerMocker.setRecordRequests(boolean)
-
respondsWithDefaultContentType
@Deprecated public Jadler.OngoingConfiguration respondsWithDefaultContentType(String defaultContentType)
Deprecated.usewithDefaultResponseContentType(java.lang.String)insteadDefines 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))- Parameters:
defaultContentType- defaultContent-Typeheader of every http stub response- Returns:
- this ongoing configuration
-
withDefaultResponseContentType
public Jadler.OngoingConfiguration withDefaultResponseContentType(String defaultContentType)
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 (seeResponseStubbing.withContentType(java.lang.String)).- Specified by:
withDefaultResponseContentTypein interfaceJadlerConfiguration- Parameters:
defaultContentType- defaultContent-Typeheader of every http stub response- Returns:
- this ongoing configuration
-
-