I want to verify that a number of functions were called in a specific order, but one of the functions gets called N times:
verifyOrder {
myMockObject.func1()
(exactly = 10) myMockObject.func2()
myMockObject.func3()
}
How do I specify the "exactly = 10" above?
That is not possible. Your best option would be
verifySequence
, which verifies that the calls happened in a specified sequence.It is not pretty, but to my knowledge, you have no better alternative.