Skip to content

Commit

Permalink
feat: #1112 add interaction description and consumer name to output w…
Browse files Browse the repository at this point in the history
…hen an expected state change cannot be found
  • Loading branch information
anto committed Jun 11, 2020
1 parent a73507f commit 25ba8d9
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,9 @@ open class InteractionRunner<I>(
val methods = findStateChangeMethod(state, testTarget.getStateHandlers())
if (methods.isEmpty()) {
return Fail(MissingStateChangeMethod("MissingStateChangeMethod: Did not find a test class method annotated " +
"with @State(\"${state.name}\")"))
"with @State(\"${state.name}\") " +
"for Interaction (\"${interaction.description}\") " +
"and Consumer ${pact.consumer.name}"))
} else {
stateChange = RunStateChanges(stateChange, methods, listOf(Supplier { target }) +
testTarget.getStateHandlers().map { it.right }, state, testContext, testTarget.verifier)
Expand Down

0 comments on commit 25ba8d9

Please sign in to comment.