expect method

void expect(
  1. List<Checker<Response>> conditions
)

Implementation

void expect(List<Checker<http.Response>> conditions) {
  final mismatches = conditions
      .map((c) => c(this))
      .reduce((List<Mismatch> v, List<Mismatch> e) => v..addAll(e))
      .toList();
  if (mismatches.length != 0) {
    throw mismatches;
  }
}