testCacheWith<T extends CacheStore> function Null safety

Future<void> testCacheWith<T extends CacheStore>(
  1. TestContext<T> ctx,
  2. {Set<CacheTest> tests = _cacheTests}
)

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

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

Implementation

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