Package org.mockserver.client
Record Class MockServerClient.ContractResult
java.lang.Object
java.lang.Record
org.mockserver.client.MockServerClient.ContractResult
- Record Components:
operationId- the OpenAPI operationId exercised (contract test), ornullmethod- the HTTP methodpath- the request pathmatchedOperation- theMETHOD /pathspec operation matched (traffic validation), ornullstatusCode- the HTTP status code received (contract test), or0when not applicablepassed- whether the request and response conformed to the specrequestErrors- request-side validation errors (empty when none)responseErrors- response-side validation errors (empty when none)
- Enclosing class:
- MockServerClient
public static record MockServerClient.ContractResult(String operationId, String method, String path, String matchedOperation, int statusCode, boolean passed, List<String> requestErrors, List<String> responseErrors)
extends Record
Result of validating a single operation/request against an OpenAPI specification.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thematchedOperationrecord component.method()Returns the value of themethodrecord component.Returns the value of theoperationIdrecord component.booleanpassed()Returns the value of thepassedrecord component.path()Returns the value of thepathrecord component.Returns the value of therequestErrorsrecord component.Returns the value of theresponseErrorsrecord component.intReturns the value of thestatusCoderecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ContractResult
public ContractResult(String operationId, String method, String path, String matchedOperation, int statusCode, boolean passed, List<String> requestErrors, List<String> responseErrors) Creates an instance of aContractResultrecord class.- Parameters:
operationId- the value for theoperationIdrecord componentmethod- the value for themethodrecord componentpath- the value for thepathrecord componentmatchedOperation- the value for thematchedOperationrecord componentstatusCode- the value for thestatusCoderecord componentpassed- the value for thepassedrecord componentrequestErrors- the value for therequestErrorsrecord componentresponseErrors- the value for theresponseErrorsrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
operationId
Returns the value of theoperationIdrecord component.- Returns:
- the value of the
operationIdrecord component
-
method
Returns the value of themethodrecord component.- Returns:
- the value of the
methodrecord component
-
path
Returns the value of thepathrecord component.- Returns:
- the value of the
pathrecord component
-
matchedOperation
Returns the value of thematchedOperationrecord component.- Returns:
- the value of the
matchedOperationrecord component
-
statusCode
public int statusCode()Returns the value of thestatusCoderecord component.- Returns:
- the value of the
statusCoderecord component
-
passed
public boolean passed()Returns the value of thepassedrecord component.- Returns:
- the value of the
passedrecord component
-
requestErrors
Returns the value of therequestErrorsrecord component.- Returns:
- the value of the
requestErrorsrecord component
-
responseErrors
Returns the value of theresponseErrorsrecord component.- Returns:
- the value of the
responseErrorsrecord component
-