Replies: 2 comments 1 reply
-
|
Ah, that'd be cool! I used Spock in the past and loved that DSL :) Would you be able to put together a PR to add this feature? π |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
@Raibaz i'd appreciate if you could confirm this and give me feedback π |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
currently, in MockK, we need to separate
verifyblocks to verify call counts of mocked methods.for example:
this is a bit troublesome and not readable for me (and maybe for us?).
i'd like to propose to introduce new DSL to verify them easily like below:
verify { 1 * { mock.hello("Bob") } 0 * { mock.hello("Alice") } 0 * { mock.goodBye(any()) } (0..5) * { mock.hello(any()) } }this DSL can be implemented like below
such DSL is introduced into other famous JVM mocking libraries e.g., Mockito-Kotlin and Spock
thank you for reading!
Beta Was this translation helpful? Give feedback.
All reactions