FakeDeviceHardwareRepository
A test double for DeviceHardwareRepository backed by an in-memory map keyed by (hwModel, target).
Call setHardware (or setHardwareForModel) to seed results, or setResult to control the exact Result returned for a given lookup. By default, lookups return Result.success(null).
Properties
Link copied to clipboard
Records every getDeviceHardwareByModel invocation for assertion.
Functions
Link copied to clipboard
open suspend override fun getDeviceHardwareByModel(hwModel: Int, target: String?, forceRefresh: Boolean): Result<DeviceHardware?>
Link copied to clipboard
Seeds a successful lookup for the given model/target pair.
Link copied to clipboard
Seeds a successful lookup for any target of the given model.