Package org.mockserver.model
Class CrossProtocolScenario
java.lang.Object
org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
org.mockserver.model.CrossProtocolScenario
Describes a cross-protocol scenario correlation: when a protocol event
matching
trigger (and optionally matchPattern) is
observed, the named scenario is advanced to targetState.
This allows multi-protocol test flows such as "when a DNS query for api.example.com is seen, advance to the 'DnsObserved' state so HTTP expectations gated on that state become active."
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CrossProtocolScenariostatic CrossProtocolScenarioonDnsQuery(String queryName, String scenarioName, String targetState) static CrossProtocolScenarioonGrpcRequest(String serviceName, String scenarioName, String targetState) static CrossProtocolScenarioonHttpPath(String pathPattern, String scenarioName, String targetState) static CrossProtocolScenarioonWebSocketConnect(String scenarioName, String targetState) withMatchPattern(String matchPattern) withScenarioName(String scenarioName) withTargetState(String targetState) withTrigger(CrossProtocolTrigger trigger) Methods inherited from class org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
equals, fieldsExcludedFromEqualsAndHashCode, hashCode, toString
-
Constructor Details
-
CrossProtocolScenario
public CrossProtocolScenario()
-
-
Method Details
-
crossProtocolScenario
-
getTrigger
-
withTrigger
-
getScenarioName
-
withScenarioName
-
getTargetState
-
withTargetState
-
getMatchPattern
-
withMatchPattern
-
onDnsQuery
public static CrossProtocolScenario onDnsQuery(String queryName, String scenarioName, String targetState) -
onWebSocketConnect
-
onGrpcRequest
public static CrossProtocolScenario onGrpcRequest(String serviceName, String scenarioName, String targetState) -
onHttpPath
public static CrossProtocolScenario onHttpPath(String pathPattern, String scenarioName, String targetState)
-