testing library

Test doubles for simutil_core, in the style of package:http/testing.dart.

Import only from tests; production code uses simutil_core.dart.

import 'package:simutil_core/testing.dart';

final exec = FakeCommandExec((cmd, args) => FakeCommandExec.ok('ok'));
final adb = FakeDeviceService(simulators: [testAndroidEmulator()]);

Classes

FakeCommandCall
One recorded FakeCommandExec.run call.
FakeCommandExec
Lightweight configurable CommandExec fake for service tests.
FakeDeviceService
In-memory DeviceService returning fixed device lists.

Functions

testAndroidEmulator({String id = 'emulator-5554', String name = 'Pixel 7', DeviceState state = DeviceState.booted}) → Device
Booted Android emulator; override only what the test cares about.
testAndroidPhone({String id = 'R58M123ABC', String name = 'Galaxy S23', DeviceState state = DeviceState.booted}) → Device
Connected physical Android device.
testIosPhone({String id = '00008110-0001', String name = 'iPhone', DeviceState state = DeviceState.booted}) → Device
Connected physical iPhone.
testIosSimulator({String id = 'sim-1', String name = 'iPhone 15', DeviceState state = DeviceState.booted}) → Device
Booted iOS simulator.