Updated Camel docs
This commit is contained in:
@@ -102,4 +102,36 @@ And the received message would pass the following assertions
|
||||
[source,groovy]
|
||||
----
|
||||
include::src/test/groovy/io/codearte/accurest/stubrunner/messaging/camel/CamelStubRunnerSpec.groovy[tags=client_receive_message,indent=0]
|
||||
----
|
||||
|
||||
===== Custom triggers
|
||||
|
||||
`StubTrigger` gives you the following options to trigger a message:
|
||||
|
||||
===== Trigger by label
|
||||
|
||||
[source,groovy]
|
||||
----
|
||||
include::src/test/groovy/io/codearte/accurest/stubrunner/messaging/camel/CamelStubRunnerSpec.groovy[tags=client_trigger,indent=0]
|
||||
----
|
||||
|
||||
===== Trigger by group and artifact ids
|
||||
|
||||
[source,groovy]
|
||||
----
|
||||
include::src/test/groovy/io/codearte/accurest/stubrunner/messaging/camel/CamelStubRunnerSpec.groovy[tags=trigger_group_artifact,indent=0]
|
||||
----
|
||||
|
||||
===== Trigger by artifact ids
|
||||
|
||||
[source,groovy]
|
||||
----
|
||||
include::src/test/groovy/io/codearte/accurest/stubrunner/messaging/camel/CamelStubRunnerSpec.groovy[tags=trigger_artifact,indent=0]
|
||||
----
|
||||
|
||||
===== Trigger all messages
|
||||
|
||||
[source,groovy]
|
||||
----
|
||||
include::src/test/groovy/io/codearte/accurest/stubrunner/messaging/camel/CamelStubRunnerSpec.groovy[tags=trigger_all,indent=0]
|
||||
----
|
||||
@@ -64,7 +64,9 @@ class CamelStubRunnerSpec extends Specification {
|
||||
|
||||
def 'should trigger a label for the existing groupId:artifactId'() {
|
||||
when:
|
||||
// tag::trigger_group_artifact[]
|
||||
stubFinder.trigger('io.codearte.accurest.stubs:camelService', 'return_book_1')
|
||||
// end::trigger_group_artifact[]
|
||||
then:
|
||||
Exchange receivedMessage = camelContext.createConsumerTemplate().receive('jms:output', 5000)
|
||||
and:
|
||||
@@ -75,7 +77,9 @@ class CamelStubRunnerSpec extends Specification {
|
||||
|
||||
def 'should trigger a label for the existing artifactId'() {
|
||||
when:
|
||||
// tag::trigger_artifact[]
|
||||
stubFinder.trigger('camelService', 'return_book_1')
|
||||
// end::trigger_artifact[]
|
||||
then:
|
||||
Exchange receivedMessage = camelContext.createConsumerTemplate().receive('jms:output', 5000)
|
||||
and:
|
||||
@@ -104,7 +108,9 @@ class CamelStubRunnerSpec extends Specification {
|
||||
|
||||
def 'should trigger messages by running all triggers'() {
|
||||
when:
|
||||
// tag::trigger_all[]
|
||||
stubFinder.trigger()
|
||||
// end::trigger_all[]
|
||||
then:
|
||||
Exchange receivedMessage = camelContext.createConsumerTemplate().receive('jms:output', 5000)
|
||||
and:
|
||||
|
||||
Reference in New Issue
Block a user