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

Future<void> testCacheWith<T extends Store<CacheInfo, CacheEntry>>(
  1. CacheTestContext<T> ctx,
  2. {Set<CacheTest> cacheTests = _cacheTests}
)

Entry point for the cache testing harness. It delegates most of the construction to user provided functions that are responsible for the Store creation, the Cache creation and by the generation of testing values (with a provided ValueGenerator instance). They are encapsulated in provided CacheTestContext object

  • ctx: the test context
  • cacheTests: The set of tests

Implementation

Future<void> testCacheWith<T extends Store<CacheInfo, CacheEntry>>(
    CacheTestContext<T> ctx,
    {Set<CacheTest> cacheTests = _cacheTests}) async {
  for (var test in _getCacheTests<T>(tests: cacheTests)) {
    await test(ctx).then(ctx.deleteStore);
  }
}