take method
- String operationId
The fault for the next request of operationId, used up by one; null when no rule
matches. The fake server calls this once per request.
Implementation
RequestFault? take(String operationId) {
for (final rule in _rules) {
final op = rule.fault.operationId;
if (op != null && op != operationId) continue;
if (--rule.times <= 0) _rules.remove(rule);
return rule.fault;
}
return null;
}