Skip to content

Is it possible to count constructed mockks? #1210

Answered by Raibaz
ak131554 asked this question in Q&A
Discussion options

You must be logged in to vote

Short answer: no, it currently isn't possible.

However, it may be possible if the ConstructionInvocationHandler in JvmConstructionMockFactory kept track of when it was called and then the public API exposed a method to get the invocation count by class.

This seems like a useful feature, I'd be more than happy to review a PR about it!

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ak131554
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants