testing library

Test utilities for consumers of flutter_universal_sync_core.

Import this library (not flutter_universal_sync_core.dart) from adapter packages' test/ suites to access the shared runLocalDatabaseAdapterContract and runRemoteSyncAdapterContract helpers.

Classes

InMemoryAdapter
An in-memory LocalDatabaseAdapter for tests and the contract suite.
RemoteAdapterHarness
Couples a RemoteSyncAdapter under test to the backend it talks to, so the contract can both drive the adapter and inspect/seed that backend directly.

Functions

runLocalDatabaseAdapterContract({required LocalDatabaseAdapter factory(), required Future<void> createTestTable(LocalDatabaseAdapter), required Future<void> createBrokenTable(LocalDatabaseAdapter), required String adapterName}) → void
Runs the LocalDatabaseAdapter contract suite against factory.
runRemoteSyncAdapterContract({required String adapterName, required RemoteAdapterHarness newHarness(), String table = 'things'}) → void
Runs the shared RemoteSyncAdapter behavioural contract against the adapter produced by newHarness — the remote-side counterpart of runLocalDatabaseAdapterContract.