batch_fetcher_testing library
Test doubles for exercising a BatchFetcher without real time or a real
backend.
Import this from tests only. It adds no dependencies — there is no
flutter_test here, so it works under test and flutter_test alike.
Classes
- FakeClock
- A Clock whose time only moves when a test moves it.
-
RecordingObserver<
TId> - A BatchFetcherObserver that records what happened, for assertions.
-
ScriptedRequest<
TId, TValue, TKey> - A BatchRequest that replays a script of outcomes, one per call.