AssetTestStore class

Test store that can be used to read tests from asset files. Each asset file may contain one or more tests.

In order to use the AssetTestStore to read from assets, you must set either the static testAssetIndex or the testAssets list (but not both) with the full asset name / path to retrieve the asset data from.

The AssetTestStore only supports the read operation and not the write or report operation.

Constructors

AssetTestStore({String? testAssetIndex, List<String>? testAssets})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
testAssetIndex String?
Set this to the path of an asset file containing an array with the list of other JSON files to load.
getter/setter pair
testAssets List<String>?
Set this to the list of asset files to use when loading the tests before calling testReader.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
testReader(BuildContext? context, {String? suiteName}) Future<List<PendingTest>>
Reads and returns zero or more tests from the assets defined by testAssets. This ignores the context that is passed in. This will never throw an error or return null and will instead return an empty array if it encounters issues loading the tests.
toString() String
A string representation of this object.
inherited

Operators

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