Fixes messaging
This commit is contained in:
@@ -109,8 +109,7 @@ testImplementation(group: 'org.springframework.cloud', name: 'spring-cloud-strea
|
||||
|
||||
The main interface used by the tests is
|
||||
`org.springframework.cloud.contract.verifier.messaging.MessageVerifierSender` and `org.springframework.cloud.contract.verifier.messaging.MessageVerifierReceiver`.
|
||||
It defines how to send and receive messages. If you need both sender and receiver capabilities you can use `org.springframework.cloud.contract.verifier.messaging.MessageVerifier` interface. You can create your own implementation to
|
||||
achieve the same goal.
|
||||
It defines how to send and receive messages.
|
||||
|
||||
In a test, you can inject a `ContractVerifierMessageExchange` to send and receive
|
||||
messages that follow the contract. Then add `@AutoConfigureMessageVerifier` to your test.
|
||||
|
||||
@@ -389,7 +389,7 @@ dependencies, tries to:
|
||||
- Start a WireMock server for each Maven dependency on a random port from the provided
|
||||
range of ports or the provided port
|
||||
- Feed the WireMock server with all JSON files that are valid WireMock definitions
|
||||
- Send messages (remember to pass an implementation of `MessageVerifier` interface)
|
||||
- Send messages (remember to pass an implementation of `MessageVerifierSender` interface)
|
||||
|
||||
Stub Runner uses the https://wiki.eclipse.org/Aether[Eclipse Aether] mechanism to download the Maven dependencies.
|
||||
Check their https://wiki.eclipse.org/Aether[docs] for more information.
|
||||
@@ -430,7 +430,7 @@ See the <<features-stub-runner-common-properties-junit-spring>> for more informa
|
||||
how to apply global configuration of Stub Runner.
|
||||
|
||||
IMPORTANT: To use the JUnit rule or JUnit 5 extension together with messaging, you have to provide an implementation of the
|
||||
`MessageVerifier` interface to the rule builder (for example, `rule.messageVerifier(new MyMessageVerifier())`).
|
||||
`MessageVerifierSender` and `MessageVerifierReceiver` interface to the rule builder (for example, `rule.messageVerifierSender(new MyMessageVerifierSender())`).
|
||||
If you do not do this, then, whenever you try to send a message, an exception is thrown.
|
||||
|
||||
[[features-stub-runner-rule-maven-settings]]
|
||||
|
||||
Reference in New Issue
Block a user