Method for asserting minimum number of invocations made to a method.
Changes
Added assertion method named AssertMinNumberOfCalls which takes expected minimum number of calls along with the method name for assertion. Assertion fails if specified minimum number of invocations are not made to the method.
Motivation
There are cases where exact number of invocations of a method cannot be predetermined accurately. Eg, number of network calls made by a retry logic which is governed by time out and time delay. Number of calls made in such cases will depend on time of previous call and time out of governing context. Hence ability to ensure a minimum threshold is required
Summary
Method for asserting minimum number of invocations made to a method.
Changes
Added assertion method named
AssertMinNumberOfCalls
which takes expected minimum number of calls along with the method name for assertion. Assertion fails if specified minimum number of invocations are not made to the method.Motivation
There are cases where exact number of invocations of a method cannot be predetermined accurately. Eg, number of network calls made by a retry logic which is governed by time out and time delay. Number of calls made in such cases will depend on time of previous call and time out of governing context. Hence ability to ensure a minimum threshold is required
Example usage