Conformance check for an interaction adapter (capsule-v2): runs a scenario against the dependency while capturing, encodes the events as a capsule would, replays the scenario offline with a fresh adapter, and compares what the app saw.
final result = await AdapterConformance.run(
create: (replaying) => WeatherAdapter(api: replaying ? ThrowingApi() : FakeApi()),
scenario: (adapter) async => (await adapter.forecast('Oslo')).toJson(),
);
expect(result.problems, isEmpty);
create(true) should wire a dependency that fails if it is called, so
the check also proves replay never reaches the real SDK.
Properties
- 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
Static Methods
-
run<
A extends InteractionIntegration> ({required A create(bool replaying), required FutureOr< Object?> scenario(A adapter), Redactor? redactor, Duration settle = const Duration(milliseconds: 50)}) → Future<AdapterConformanceResult>