AuthStoreConformanceSuite class final

Reusable contract suite for durable AuthStore implementations.

The suite has no dependency on a particular test framework. A package using package:test can register the cases like this:

final suite = AuthStoreConformanceSuite.fromStoreFactory(
  createStore: () => SqlAuthStore.openForTest(),
  disposeStore: (store) => (store as SqlAuthStore).close(),
);

for (final conformanceCase in suite.cases) {
  test(conformanceCase.description, () async {
    final result = await conformanceCase.run();
    if (result.isSkipped) markTestSkipped(result.skippedReason!);
  });
}

Every case receives a new fixture. Base cases only use AuthStore. Cases for optional interfaces report a skipped result when the interface is not present. In particular, WebAuthn stores are not required by this suite. Case IDs are stable public contract identifiers suitable for CI reports and adapter allowlists; additions do not change existing identifiers.

Constructors

AuthStoreConformanceSuite({required AuthStoreConformanceFixtureFactory createFixture})
Creates a suite backed by an isolated fixture factory.
AuthStoreConformanceSuite.fromStoreFactory({required AuthStoreConformanceStoreFactory createStore, AuthStoreConformanceStoreDisposer? disposeStore})
Creates a suite from a store factory and optional disposer.
factory

Properties

cases List<AuthStoreConformanceCase>
Independently runnable cases in stable registration order.
latefinal
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited