Skip to content

Is it possible to reset invocation count? #842

Answered by Chrostoq
rawilder asked this question in Q&A
Discussion options

You must be logged in to vote

You should be able to do this by calling clearMocks and set all parameters but recordedCalls to false

clearMocks(
    yourMockk,
    answers = false,
    recordedCalls = true,
    childMocks = false,
    verificationMarks = true,  // set this to true to have verifyAll be reset as well 
    exclusionRules = false
)

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@rawilder
Comment options

@Chrostoq
Comment options

Answer selected by rawilder
Comment options

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