Skip to content

Commit

Permalink
test: change arg method in MockKAnswerScope
Browse files Browse the repository at this point in the history
  • Loading branch information
jbl428 authored and shouwn committed Sep 18, 2023
1 parent 7f488a5 commit cda8d02
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ internal class JpqlSerializerExtension : InvocationInterceptor, BeforeEachCallba
every { any.write(any<String>()) } just runs
every { any.writeIfAbsent(any<String>()) } just runs
every { any.writeEach<Any>(any(), any(), any(), any(), any()) } answers {
val predicates: Iterable<Any> = arg(0)
val write: (Any) -> Unit = arg(4)
val predicates = firstArg<Iterable<Any>>()
val write = lastArg<(Any) -> Unit>()

predicates.forEach { predicate -> write(predicate) }
}
every { any.writeParentheses(any<() -> Unit>()) } answers {
val inner: () -> Unit = arg(0)
val inner = firstArg<() -> Unit>()

inner()
}
Expand Down

0 comments on commit cda8d02

Please sign in to comment.