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

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 entry in (types ?? _typeTests).entries) {
    test('Cache: ${entry.key.name}', () async {
      await testCacheWith<T>(newCacheTestContext(entry.value()),
          cacheTests: cacheTests);
    });
  }
}