ad_flow_testing library

Test doubles for apps that unit-test their ad integration.

Import in test files only:

import 'package:ad_flow/ad_flow_testing.dart';

final sdk = FakeAdSdk()..canRequestAdsResult = true;
final ads = await AdFlow.initialize(config, sdk: sdk, ...);

Classes

ConsentUpdateCall
One recorded FakeAdSdk.requestConsentInfoUpdate call.
FakeAdSdk
A fully controllable AdSdk test double.
FakeBannerHandle
A drivable fake banner handle. buildWidget returns a SizedBox of size so widget tests can pump it without platform views.
FakeFullScreenAdHandle
A drivable fake full-screen ad handle.
FakeNativeHandle
A drivable fake native handle. buildWidget returns a fixed-size SizedBox so widget tests can pump it without platform views.