CapturedTest class

Snapshot of a single test('name', body, tags: [...]) call discovered during codegen and materialized at runtime through the captured.dart shim.

The setUps and tearDowns are the group-scoped hooks that enclose the test in declaration order: setUps run outer→inner, tearDowns run inner→outer.

Constructors

CapturedTest({required String packageName, required String sourceUri, required List<String> groupChain, required String name, required Set<String> tags, required List<CapturedHook> setUps, required List<CapturedHook> tearDowns, required CapturedHook body})
Builds a captured snapshot. Only the codegen output constructs these; user code consumes them indirectly via TestInjector getters.

Properties

body → CapturedHook
The captured test() body, preserving its original closure context.
final
fqId String
<package>:<group1>/<group2>/.../<name>, with the / collapsed when the test is not nested in any group.
no setter
groupChain List<String>
Enclosing group() chain, outermost first.
final
hashCode int
The hash code for this object.
no setterinherited
name String
Literal first argument passed to test('...').
final
packageName String
Name of the Dart package the original test() lives in.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
setUps List<CapturedHook>
Group-scoped setUp hooks, ordered outer→inner.
final
sourceUri String
Package-relative URI of the source file, e.g. test/foo_test.dart.
final
tags Set<String>
Union of the tags: parameter and any group-inherited tags.
final
tearDowns List<CapturedHook>
Group-scoped tearDown hooks, ordered inner→outer.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toStep() TestStep
Materializes this snapshot as a TestStep that runs setUps → body → tearDowns, respecting nesting order.
toString() String
A string representation of this object.
inherited

Operators

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