Workaround for missing message destination in message-pacts: Description field is used.
This commit is contained in:
committed by
Marcin Grzejszczak
parent
7b0b264d4b
commit
70adb02ec9
@@ -133,6 +133,9 @@ class MessagingSCContractCreator {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sentTo(guessDestination(message));
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -147,4 +150,12 @@ class MessagingSCContractCreator {
|
||||
.uncapitalize() + "()"
|
||||
}
|
||||
|
||||
}
|
||||
private String guessDestination(Message message) {
|
||||
String[] outcomeParts = message.description.split(' ')
|
||||
if (outcomeParts.length > 0) {
|
||||
return outcomeParts[outcomeParts.length - 1]
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -659,6 +659,7 @@ class PactContractConverterSpec extends Specification {
|
||||
triggeredBy('bookReturnedTriggered()')
|
||||
}
|
||||
outputMessage {
|
||||
sentTo 'activemq:output'
|
||||
body([
|
||||
bookName: "foo"
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user