wasCalled static method
Check if an endpoint was called.
Implementation
static bool wasCalled(String endpoint, {String? method, int? times}) {
final calls = getCallsFor(endpoint).where((c) {
if (method != null && c.method != method.toUpperCase()) return false;
return true;
}).toList();
if (times != null) {
return calls.length == times;
}
return calls.isNotEmpty;
}