-
-
Notifications
You must be signed in to change notification settings - Fork 9
Closed
Labels
enhancement 🚀New feature or requestNew feature or request
Description
As per the documentation, exhaustiveness is only checked for mocks that are in the verify block. However it would be nice to also have an option where the exhaustiveness is verified for all registered mocks, to make sure no unintended side effects are happening.
Example:
repository.findById("1")
repository.findById("2")
repository.findAll()
verifySuspend(exhaustiveOrder) {
// Verification currently passes - no mock is verified
// repository.findById(any())
// repository.findById(any())
// repository.findAll()
}
Would like something like this:
repository.findById("1")
repository.findById("2")
repository.findAll()
verifySuspend(allExhaustiveOrder) {
// Verification fails - findById not verified
// repository.findById(any())
// repository.findById(any())
// repository.findAll()
}
I know there is a manual call that can be executed to make sure no more calls are happening on a mock:
verifyNoMoreCalls(repository)
, but that is error prone as you might forget to add a newly added mock to this statement.
Metadata
Metadata
Assignees
Labels
enhancement 🚀New feature or requestNew feature or request