Test class abstract

A single test case. The test's ID is unique in the context of this test run. It's used elsewhere in the protocol to refer to this test without including its full representation.

Available extensions
Annotations
  • @freezed

Constructors

Test({required int id, required String name, required int suiteID, required List<int> groupIDs, required int? line, required int? column, required String? url, required int? rootLine, required int? rootColumn, required String? rootUrl, required TestMetadata metadata})
A single test case. The test's ID is unique in the context of this test run. It's used elsewhere in the protocol to refer to this test without including its full representation.
const
factory
Test.fromJson(Map<String, dynamic> json)
A single test case. The test's ID is unique in the context of this test run. It's used elsewhere in the protocol to refer to this test without including its full representation.
factory

Properties

column int?
The (1-based) column on which the test was defined, or null.
no setterinherited
copyWith → $TestCopyWith<Test>
Create a copy of Test with the given fields replaced by the non-null parameter values.
no setterinherited
groupIDs List<int>
The IDs of groups containing this test, in order from outermost to innermost.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
id int
An opaque ID for the test.
no setterinherited
line int?
The (1-based) line on which the test was defined, or null.
no setterinherited
metadata TestMetadata
This field is deprecated and should not be used.
no setterinherited
name String
The name of the test, including prefixes from any containing groups.
no setterinherited
rootColumn int?
The (1-based) line on in the original test suite from which the test originated.
no setterinherited
rootLine int?
The (1-based) line in the original test suite from which the test originated.
no setterinherited
rootUrl String?
The URL for the original test suite in which the test was defined.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
suiteID int
The ID of the suite containing this test.
no setterinherited
url String?
The URL for the file in which the test was defined, or null.
no setterinherited

Methods

map<TResult extends Object?>(TResult $default(_Test value)) → TResult

Available on Test, provided by the TestPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_Test value)?) → TResult?

Available on Test, provided by the TestPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_Test value)?, {required TResult orElse()}) → TResult

Available on Test, provided by the TestPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(int id, String name, int suiteID, List<int> groupIDs, int? line, int? column, String? url, int? rootLine, int? rootColumn, String? rootUrl, TestMetadata metadata)?, {required TResult orElse()}) → TResult

Available on Test, provided by the TestPatterns extension

A variant of when that fallback to an orElse callback.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this Test to a JSON map.
inherited
toString() String
A string representation of this object.
inherited
when<TResult extends Object?>(TResult $default(int id, String name, int suiteID, List<int> groupIDs, int? line, int? column, String? url, int? rootLine, int? rootColumn, String? rootUrl, TestMetadata metadata)) → TResult

Available on Test, provided by the TestPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(int id, String name, int suiteID, List<int> groupIDs, int? line, int? column, String? url, int? rootLine, int? rootColumn, String? rootUrl, TestMetadata metadata)?) → TResult?

Available on Test, provided by the TestPatterns extension

A variant of when that fallback to returning null

Operators

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