statusCodeIs function

Checker<Response> statusCodeIs(
  1. int expected
)

Implementation

Checker<Response> statusCodeIs(int expected) => (Response resp) {
      if (expected != resp.statusCode)
        return <Mismatch>[
          new EqualityMismatch(expected, resp.statusCode,
              customMessage: (m) =>
                  'Expected statuscode ${m.expected} but found ${m.actual}!')
        ];
      return <Mismatch>[];
    };