Package org.mockserver.client
Record Class MockServerClient.ContractReport
java.lang.Object
java.lang.Record
org.mockserver.client.MockServerClient.ContractReport
- Record Components:
total- the total number of operations / requests validatedpassed- the number that conformed to the specfailed- the number that did not conformallPassed-truewhen every result passedresults- the per-operation / per-request results
- Enclosing class:
- MockServerClient
public static record MockServerClient.ContractReport(int total, int passed, int failed, boolean allPassed, List<MockServerClient.ContractResult> results)
extends Record
Structured report returned by
MockServerClient.contractTest(java.lang.String, java.lang.String) and MockServerClient.trafficValidate(java.lang.String).-
Constructor Summary
ConstructorsConstructorDescriptionContractReport(int total, int passed, int failed, boolean allPassed, List<MockServerClient.ContractResult> results) Creates an instance of aContractReportrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theallPassedrecord component.final booleanIndicates whether some other object is "equal to" this one.intfailed()Returns the value of thefailedrecord component.final inthashCode()Returns a hash code value for this object.intpassed()Returns the value of thepassedrecord component.results()Returns the value of theresultsrecord component.final StringtoString()Returns a string representation of this record class.inttotal()Returns the value of thetotalrecord component.
-
Constructor Details
-
ContractReport
public ContractReport(int total, int passed, int failed, boolean allPassed, List<MockServerClient.ContractResult> results) Creates an instance of aContractReportrecord class.
-
-
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 '=='. -
total
public int total()Returns the value of thetotalrecord component.- Returns:
- the value of the
totalrecord component
-
passed
public int passed()Returns the value of thepassedrecord component.- Returns:
- the value of the
passedrecord component
-
failed
public int failed()Returns the value of thefailedrecord component.- Returns:
- the value of the
failedrecord component
-
allPassed
public boolean allPassed()Returns the value of theallPassedrecord component.- Returns:
- the value of the
allPassedrecord component
-
results
Returns the value of theresultsrecord component.- Returns:
- the value of the
resultsrecord component
-