testCache<T extends CacheStore> function

void testCache<T extends CacheStore>(
  1. TestContextBuilder<T> newTestContext, {
  2. Map<TypeTest, Function>? types,
  3. Set<CacheTest> tests = _cacheTests,
})

Default cache test

  • newTestContext: The context builder
  • types: The type/generator map
  • tests: The test set

Implementation

void testCache<T extends CacheStore>(TestContextBuilder<T> newTestContext,
    {Map<TypeTest, Function>? types, Set<CacheTest> tests = _cacheTests}) {
  for (var entry in (types ?? _typeTests).entries) {
    test('Cache: ${EnumToString.convertToString(entry.key)}', () async {
      await testCacheWith<T>(newTestContext(entry.value()), tests: tests);
    });
  }
}