callCount method
Number of requests seen, optionally narrowed by method and path.
Implementation
int callCount({String? method, Pattern? path}) {
return _requests.where((r) {
if (method != null && r.method != method.toUpperCase()) {
return false;
}
return path == null || _matchesPath(path, r.path);
}).length;
}