assertLoginCount method

void assertLoginCount(
  1. int expected
)

Assert that exactly expected login attempts were made.

Throws AssertionError if the count does not match.

Implementation

void assertLoginCount(int expected) {
  final actual = _fakeGuard._loginAttempts.length;
  if (actual != expected) {
    throw AssertionError(
      'Expected $expected login attempt(s) but found $actual.',
    );
  }
}