TestOf<ExpectedType> class

Create a Test with a Default Context of an ExpectedType

Tests are where you write your action and assertions. They will return a _TestResult when ran, determining if the test passed, failed, or is inconclusive (skipped).

Inheritance

Constructors

TestOf(String _title, {FutureOr<void> setup(Context<ExpectedType> test)?, FutureOr<void> teardown(Context<ExpectedType> test)?, FutureOr action(Context<ExpectedType> test)?, required List<Expect> assertions(Context<ExpectedType> test), TestOptions? options})
TestOf.skip(String _title, {FutureOr<void> setup(Context<ExpectedType> test)?, FutureOr<void> teardown(Context<ExpectedType> test)?, FutureOr action(Context<ExpectedType> test)?, required List<Expect> assertions(Context<ExpectedType> test), TestOptions? options})
Skipped. This will not run any of the stages within this test.
TestOf.stub(String _title)
Stubbed. This will be skipped and is meant to be used as a placeholder.

Properties

action FutureOr Function(Context<ExpectedType> test)?
finalinherited
assertFailures List<AssertResult>
finalinherited
assertions List<Expect> Function(Context<ExpectedType> test)
finalinherited
contextualType String
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
options TestOptions
no setterinherited
ranSuccessfully bool?
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
setup FutureOr<void> Function(Context<ExpectedType> test)?
finalinherited
skip bool
finalinherited
teardown FutureOr<void> Function(Context<ExpectedType> test)?
finalinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
report(FilterSettings filterSettings) → void
inherited
toString() String
A string representation of this object.
inherited

Operators

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