Workaround for missing message destination in message-pacts: Description field is used.

This commit is contained in:
Stephan
2019-01-04 18:26:13 +01:00
committed by Marcin Grzejszczak
parent 7b0b264d4b
commit 70adb02ec9
2 changed files with 13 additions and 1 deletions

View File

@@ -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 ''
}
}

View File

@@ -659,6 +659,7 @@ class PactContractConverterSpec extends Specification {
triggeredBy('bookReturnedTriggered()')
}
outputMessage {
sentTo 'activemq:output'
body([
bookName: "foo"
])