Group class

A group contains one or more tests and subgroups.

It includes metadata that applies to all contained tests.

Implemented types

Constructors

Group(String name, Iterable<GroupEntry> entries, {Metadata? metadata, Trace? trace, TestLocation? location, Test? setUpAll, Test? tearDownAll})
Group.root(Iterable<GroupEntry> entries, {Metadata? metadata})
Returns a new root-level group.

Properties

entries List<GroupEntry>
The children of this group.
final
hashCode int
The hash code for this object.
no setterinherited
location TestLocation?
An optional location provided to test() or group() to support test frameworks like pkg:test_reflective_loader where the test/group location might not be in trace at the time test() or group() are called.
final
metadata Metadata
The metadata for the entry, including the metadata from any containing Groups.
final
name String
The name of the entry, including the prefixes from any containing Groups.
final
parent Group?
The parent of this entry.
getter/setter pairoverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
setUpAll Test?
A test to run before all tests in the group.
final
tearDownAll Test?
A test to run after all tests in the group.
final
testCount int
The number of tests (recursively) in this group.
no setter
trace → Trace?
The stack trace for the call to test() or group() that defined this entry, or null if the entry was defined in a different way.
final

Methods

clone() Group?
Returns a clone of this object without the internal parent reference set so that it may be attached to a new tree.
override
filter(bool callback(Test)) Group?
Returns a copy of this with all tests that don't match callback removed.
override
forPlatform(SuitePlatform platform) Group?
Returns a copy of this with all platform-specific metadata resolved.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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