Skip to content

Commit

Permalink
Merge pull request #1123 from anto-ac/fix-displayname-for-junit5-veri…
Browse files Browse the repository at this point in the history
…fication-provider

fix: correct display name for junit5 verification provider
  • Loading branch information
Ronald Holshausen authored Jun 15, 2020
2 parents b3c12be + 6349fa9 commit 507d870
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,14 @@ class PactVerificationExtension(

override fun getDisplayName(invocationIndex: Int): String {
return when {
pactSource is BrokerUrlSource && pactSource.result != null -> if (pactSource.result!!.pending) {
pactSource.result!!.name + " [PENDING]"
} else {
pactSource.result!!.name
pactSource is BrokerUrlSource && pactSource.result != null -> {
var displayName = pactSource.result!!.name + " - ${interaction.description}"
if (pactSource.tag.isNotEmpty()) displayName += " (tag ${pactSource.tag})\""
if (pactSource.result!!.pending) {
"$displayName [PENDING]"
} else {
displayName
}
}
pactSource is BrokerUrlSource && pactSource.tag.isNotEmpty() -> "${pact.consumer.name} - ${interaction.description} (tag ${pactSource.tag})"
else -> "${pact.consumer.name} - ${interaction.description}"
Expand Down

0 comments on commit 507d870

Please sign in to comment.