TestScenarioVariant<T> class
A TestVariant implementation that iterates over a set of TestScenarios.
This class facilitates parameterized testing by allowing the test runner to inject different TestScenario variants into a single test case.
- Inheritance
-
- Object
- TestVariant<
TestScenario< T> > - TestScenarioVariant
Constructors
-
TestScenarioVariant(Set<
TestScenario< scenarios)T> > -
Creates a TestScenarioVariant with a provided set of
scenarios.
Properties
-
current
→ TestScenario<
T> -
Returns the current active scenario. Defaults to the first value in the set.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
values
→ Set<
TestScenario< T> > -
The set of scenarios to be executed in the test suite.
final
Methods
-
describeValue(
TestScenario< T> value) → String -
Returns the description of the provided
valuefor test logging and reporting.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setUp(
TestScenario< T> value) → Future<void> -
Sets the current scenario before executing a test case.
override
-
tearDown(
TestScenario< T> value, covariant Object? memento) → Future<void> -
Clears the current scenario after the test case has finished.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited