assertHas method

void assertHas(
  1. String key
)

Assert that key currently exists in the cache store.

Implementation

void assertHas(String key) {
  if (!_store.has(key)) {
    throw AssertionError(
      'Expected cache to have key "$key" but it was missing.',
    );
  }
}