Skip to content

Commit

Permalink
Use trimIndent in a human-friendly way.
Browse files Browse the repository at this point in the history
  • Loading branch information
TWiStErRob committed Dec 2, 2023
1 parent 9761f7d commit 2c7de47
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,12 @@ fun only(): VerificationMode {
inline fun <reified T : Any> check(noinline predicate: (T) -> Unit): T {
return Mockito.argThat { arg: T? ->
if (arg == null) error(
"""The argument passed to the predicate was null.
If you are trying to verify an argument to be null, use `isNull()`.
If you are using `check` as part of a stubbing, use `argThat` or `argForWhich` instead.
""".trimIndent()
"""
The argument passed to the predicate was null.
If you are trying to verify an argument to be null, use `isNull()`.
If you are using `check` as part of a stubbing, use `argThat` or `argForWhich` instead.
""".trimIndent()
)

try {
Expand Down

0 comments on commit 2c7de47

Please sign in to comment.