evaluatePreconditionById method Null safety
- PreconditionId id,
- {bool ignoreCache = false}
Runs single precondition test. If the test is already running it won't be started again and you will receive the result of already running evaluation. If the test has dependencies, they will be evaluated first. If they fail, your test won't be run at all and it's result will be PreconditionStatus.unsatisfied().
The registerPrecondition.satisfiedCache
and registerPrecondition.notSatisfiedCache
can also influence
whether the precondition will be actually run or not.
Use ignoreCache
= true to omit any cached value
Implementation
Future<Precondition> evaluatePreconditionById(PreconditionId id, {bool ignoreCache: false}) async {
var p = _known[id];
if (p == null) {
throw Exception("Precondition id = $id is not registered");
}
return evaluatePrecondition(p, ignoreCache: ignoreCache);
}