testCache<T extends Store<CacheInfo, CacheEntry>> function

void testCache<T extends Store<CacheInfo, CacheEntry>>(
  1. CacheTestContextBuilder<T> newCacheTestContext, {
  2. Map<TypeTest, Function>? types,
  3. Set<CacheTest> cacheTests = _cacheTests,
})

Default cache test

  • newCacheTestContext: The context builder
  • types: The type/generator map
  • cacheTests: The test set

Implementation

void testCache<T extends Store<CacheInfo, CacheEntry>>(
    CacheTestContextBuilder<T> newCacheTestContext,
    {Map<TypeTest, Function>? types,
    Set<CacheTest> cacheTests = _cacheTests}) {
  for (var typeTest in (types ?? _typeTests).entries) {
    test('Cache: ${typeTest.key.name}', () async {
      await testCacheWith<T>(newCacheTestContext(typeTest.value()),
          cacheTests: cacheTests);
    });
  }
}