ConditionSubject<T> class
- Implemented types
- Available extensions
Properties
-
context
→ Context<
T> -
Available on Subject<
The expectations and nesting context for this subject.T> , provided by the ContextExtension extensionno setter -
entries
→ Subject<
Iterable< MapEntry< >K, V> > -
Available on Subject<
Map< , provided by the MapChecks extensionK, V> >no setter -
first
→ Subject<
T> -
Available on Subject<
Iterable< , provided by the IterableChecks extensionT> >no setter - hashCode → int
-
The hash code for this object.
no setterinherited
-
keys
→ Subject<
Iterable< K> > -
Available on Subject<
Map< , provided by the MapChecks extensionK, V> >no setter -
last
→ Subject<
T> -
Available on Subject<
Iterable< , provided by the IterableChecks extensionT> >no setter -
length
→ Subject<
int> -
Available on Subject<
Iterable< , provided by the IterableChecks extensionT> >no setter -
length
→ Subject<
int> -
Available on Subject<
Map< , provided by the MapChecks extensionK, V> >no setter -
length
→ Subject<
int> -
Available on Subject<
String> , provided by the StringChecks extensionno setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
single
→ Subject<
T> -
Available on Subject<
Iterable< , provided by the IterableChecks extensionT> >no setter -
values
→ Subject<
Iterable< V> > -
Available on Subject<
Map< , provided by the MapChecks extensionK, V> >no setter -
withQueue
→ Subject<
StreamQueue< T> > -
Available on Subject<
Wrap the stream in aStream< , provided by the WithQueueExtension extensionT> >StreamQueue
to allow using checks from StreamChecks.no setter
Methods
-
any(
Condition< T> elementCondition) → void -
Available on Subject<
Expects that the iterable contains at least on element such thatIterable< , provided by the IterableChecks extensionT> >elementCondition
is satisfied. -
anyOf(
Iterable< Condition< conditions) → voidT> > -
Available on Subject<
Expects that the value satisfies the expectations invoked in at least one condition fromT> , provided by the CoreChecks extensionconditions
. -
anyOf(
Iterable< Condition< conditions) → Future<StreamQueue< >T> >void> -
Available on Subject<
Expects that the stream statisfies at least one condition fromStreamQueue< , provided by the StreamChecks extensionT> >conditions
. -
apply(
Subject< T> subject) → void -
Check the expectations of this condition against
subject
.override -
applyAsync(
Subject< T> subject) → Future<void> -
Check the expectations of this condition against
subject
.override -
completes(
[Condition< T> ? completionCondition]) → Future<void> -
Available on Subject<
Expects that theFuture< , provided by the FutureChecks extensionT> >Future
completes to a value without throwing. -
contains(
Pattern pattern) → void -
Available on Subject<
Expects that the value containsString> , provided by the StringChecks extensionpattern
according to String.contains; -
contains(
T element) → void -
Available on Subject<
Expects that the iterable containsIterable< , provided by the IterableChecks extensionT> >element
according to Iterable.contains. -
containsInOrder(
Iterable< String> expected) → void -
Available on Subject<
Expects that theString> , provided by the StringChecks extensionString
contains each of the sub strings in expected in the given order, with any content between them. -
containsInOrder(
Iterable< Object?> elements) → void -
Available on Subject<
Expects that the iterable contains a value matching each expected value fromIterable< , provided by the IterableChecks extensionT> >elelements
in the given order, with any extra elements between them. -
containsKey(
K key) → void -
Available on Subject<
Expects that the map containsMap< , provided by the MapChecks extensionK, V> >key
according to Map.containsKey. -
containsKeyThat(
Condition< K> keyCondition) → void -
Available on Subject<
Expects that the map contains some key such thatMap< , provided by the MapChecks extensionK, V> >keyCondition
is satisfied. -
containsValue(
V value) → void -
Available on Subject<
Expects that the map containsMap< , provided by the MapChecks extensionK, V> >value
according to Map.containsValue. -
containsValueThat(
Condition< V> valueCondition) → void -
Available on Subject<
Expects that the map contains some value such thatMap< , provided by the MapChecks extensionK, V> >valueCondition
is satisfied. -
deepEquals(
Iterable< Object?> expected) → void -
Available on Subject<
Expects that the iterable contains elements that are deeply equal to the elements ofIterable< , provided by the IterableChecks extensionT> >expected
. -
deepEquals(
Map< Object?, Object?> expected) → void -
Available on Subject<
Expects that the map contains entries that are deeply equal to the entries ofMap< , provided by the MapChecks extensionK, V> >expected
. -
doesNotComplete(
) → void -
Available on Subject<
Expects that theFuture< , provided by the FutureChecks extensionT> >Future
never completes as a value or an error. -
emits(
[Condition< T> ? emittedCondition]) → Future<void> -
Available on Subject<
Expect that theStreamQueue< , provided by the StreamChecks extensionT> >Stream
emits a value without first emitting an error. -
emitsError<
E extends Object> ([Condition< E> ? errorCondition]) → Future<void> -
Available on Subject<
Expects that the stream emits an error of typeStreamQueue< , provided by the StreamChecks extensionT> >E
. -
emitsThrough(
Condition< T> condition) → Future<void> -
Available on Subject<
Expects that theStreamQueue< , provided by the StreamChecks extensionT> >Stream
emits any number of events before emitting an event that satisfiescondition
. -
endsWith(
String other) → void -
Available on Subject<
String> , provided by the StringChecks extension -
equals(
T other) → void -
Available on Subject<
Expects that the value is equal toT> , provided by the CoreChecks extensionother
according to operator ==. -
equals(
String expected) → void -
Available on Subject<
Expects that theString> , provided by the StringChecks extensionString
contains exactly the same code units asexpected
. -
equalsIgnoringCase(
String expected) → void -
Available on Subject<
Expects that theString> , provided by the StringChecks extensionString
contains the same characters asexpected
if both were lower case. -
equalsIgnoringWhitespace(
String expected) → void -
Available on Subject<
Expects that theString> , provided by the StringChecks extensionString
contains the same content asexpected
, ignoring differences in whitsepace. -
every(
Condition< T> elementCondition) → void -
Available on Subject<
Expects there are no elements in the iterable which fail to satisfyIterable< , provided by the IterableChecks extensionT> >elementCondition
. -
has<
R> (R extract(T), String name) → Subject< R> -
Available on Subject<
Extracts a property of the value for further expectations.T> , provided by the CoreChecks extension -
identicalTo(
T other) → void -
Available on Subject<
Expects that the value is identical toT> , provided by the CoreChecks extensionother
. -
inOrder(
Iterable< Condition< conditions) → Future<StreamQueue< >T> >void> -
Available on Subject<
Expects that the stream satisfies each condition inStreamQueue< , provided by the StreamChecks extensionT> >conditions
serially. -
isA<
R> () → Subject< R> -
Available on Subject<
Expects that the value is assignable to typeT> , provided by the CoreChecks extensionT
. -
isCloseTo(
num other, num delta) → void -
Available on Subject<
Expects that the difference between this number andnum> , provided by the NumChecks extensionother
is less than or equal todelta
. -
isDone(
) → Future< void> -
Available on Subject<
Expects that the stream closes without emitting any events or errors.StreamQueue< , provided by the StreamChecks extensionT> > -
isEmpty(
) → void -
Available on Subject<
String> , provided by the StringChecks extension -
isEmpty(
) → void -
Available on Subject<
Map< , provided by the MapChecks extensionK, V> > -
isEmpty(
) → void -
Available on Subject<
Iterable< , provided by the IterableChecks extensionT> > -
isFalse(
) → void -
Available on Subject<
bool> , provided by the BoolChecks extension -
isFinite(
) → void -
Available on Subject<
Expects that num.isFinite is true.num> , provided by the NumChecks extension -
isGreaterOrEqual(
T other) → void -
Available on Subject<
Expects that this value is greater than or equal toComparable< , provided by the ComparableChecks extensionT> >other
. -
isGreaterThan(
T other) → void -
Available on Subject<
Expects that this value is greater thanComparable< , provided by the ComparableChecks extensionT> >other
. -
isInfinite(
) → void -
Available on Subject<
Expects that num.isInfinite is true.num> , provided by the NumChecks extension -
isLessOrEqual(
T other) → void -
Available on Subject<
Expects that this value is less than or equal toComparable< , provided by the ComparableChecks extensionT> >other
. -
isLessThan(
T other) → void -
Available on Subject<
Expects that this value is less thanComparable< , provided by the ComparableChecks extensionT> >other
. -
isNaN(
) → void -
Available on Subject<
Expects that num.isNaN is true.num> , provided by the NumChecks extension -
isNegative(
) → void -
Available on Subject<
Expects that num.isNegative is true.num> , provided by the NumChecks extension -
isNotEmpty(
) → void -
Available on Subject<
String> , provided by the StringChecks extension -
isNotEmpty(
) → void -
Available on Subject<
Map< , provided by the MapChecks extensionK, V> > -
isNotEmpty(
) → void -
Available on Subject<
Iterable< , provided by the IterableChecks extensionT> > -
isNotFinite(
) → void -
Available on Subject<
Expects that num.isFinite is false.num> , provided by the NumChecks extension -
isNotInfinite(
) → void -
Available on Subject<
Expects that num.isInfinite is false.num> , provided by the NumChecks extension -
isNotNaN(
) → void -
Available on Subject<
Expects that num.isNaN is false.num> , provided by the NumChecks extension -
isNotNegative(
) → void -
Available on Subject<
Expects that num.isNegative is false.num> , provided by the NumChecks extension -
isNotNull(
) → Subject< T> -
Available on Subject<
T?> , provided by the NullableChecks extension -
isNull(
) → void -
Available on Subject<
T?> , provided by the NullableChecks extension -
isTrue(
) → void -
Available on Subject<
bool> , provided by the BoolChecks extension -
matchesPattern(
Pattern expected) → void -
Available on Subject<
Expects that the string matches the patternString> , provided by the StringChecks extensionexpected
. -
mayEmit(
Condition< T> condition) → Future<void> -
Available on Subject<
Optionally consumes an event that matchesStreamQueue< , provided by the StreamChecks extensionT> >condition
from the stream. -
mayEmitMultiple(
Condition< T> condition) → Future<void> -
Available on Subject<
Optionally consumes events that matchStreamQueue< , provided by the StreamChecks extensionT> >condition
from the stream. -
neverEmits(
Condition< T> condition) → Future<void> -
Available on Subject<
Expects that the stream closes without emitting any event that satisfiesStreamQueue< , provided by the StreamChecks extensionT> >condition
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
not(
Condition< T> condition) → void -
Available on Subject<
Check that the expectations invoked inT> , provided by the CoreChecks extensioncondition
are not satisfied by this value. -
pairwiseComparesTo<
S> (List< S> expected, Condition<T> elementCondition(S), String description) → void -
Available on Subject<
Expects that the iterable contains elements that correspond by theIterable< , provided by the IterableChecks extensionT> >elementCondition
exactly to each element inexpected
. -
returnsNormally(
) → Subject< T> -
Available on Subject<
Expects that the function returns without throwing.T Function()> , provided by the FunctionChecks extension -
skip(
String message) → Subject< T> -
Available on Subject<
Mark the currently running test as skipped and return a Subject that will ignore all expectations.T> , provided by the SkipExtension extension -
startsWith(
Pattern other) → void -
Available on Subject<
String> , provided by the StringChecks extension -
throws<
E extends Object> ([Condition< E> ? errorCondition]) → Future<void> -
Available on Subject<
Expects that theFuture< , provided by the FutureChecks extensionT> >Future
completes as an error. -
throws<
E> () → Subject< E> -
Available on Subject<
Expects that a function throws synchronously when it is called.T Function()> , provided by the FunctionChecks extension -
toString(
) → String -
A string representation of this object.
override
-
unorderedEquals(
Iterable< T> expected) → void -
Available on Subject<
Expects that the iterable contains elements which equal those ofIterable< , provided by the IterableChecks extensionT> >expected
in any order. -
unorderedMatches(
Iterable< Condition< expected) → voidT> > -
Available on Subject<
Expects that the iterable contains elements which match all conditions ofIterable< , provided by the IterableChecks extensionT> >expected
in any order. -
which(
Condition< T> condition) → void -
Available on Subject<
Applies the expectations invoked inT> , provided by the CoreChecks extensioncondition
to this subject.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
K key) → Subject< V> -
Available on Subject<
Map< , provided by the MapChecks extensionK, V> >