FakeDeviceProbe class final

A device probe the test sets: caps is what capabilities reports; sha256 answers from hashes (by path), else from hashOf, else with the file's real SHA-256; the paths it was asked to hash or exclude are recorded.

Implemented types

Constructors

FakeDeviceProbe({DeviceCapabilities capabilities = defaultCapabilities, Map<String, String>? hashes, Future<String> hashOf(String path)?})

Properties

caps ↔ DeviceCapabilities
What capabilities reports; tests change it between readings.
getter/setter pair
excluded → List<String>
The paths excludeFromBackup was asked for, in order.
final
hashCode → int
The hash code for this object.
no setterinherited
hashed → List<String>
The paths sha256 was asked for, in order.
final
hashes ↔ Map<String, String>?
Fixed answers of sha256, by path.
getter/setter pair
hashOf ↔ Future<String> Function(String path)?
The answer of sha256 for a path hashes does not name; it may throw.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

capabilities() → Future<DeviceCapabilities>
Memory and free disk now; unknown figures are null.
override
excludeFromBackup(String path) → Future<void>
Keeps the file at path and its folder out of iCloud backups (no-op where backup rules do it).
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sha256(String path) → Future<String>
Lowercase hex SHA-256 of the file at path.
override
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

defaultCapabilities → const DeviceCapabilities
An 8 GB phone (7622 MB reported), 5960 MB available to the app, 50 GB free.