blooming_test library
Pure Dart declarative testing harness and LPDAG custom matchers for the Bloom framework.
Provides bloomTest declarative runner with FakeAsync virtual time fast-forwarding,
and custom LPDAG matchers (isDormant, isActive, hasSubscribers, hasGlitchFreedom,
isData, isEmptyState, isErrorState).
Classes
- BatchFunctor
- Callable functor managing transactional batch scopes in the reactive LPDAG engine.
-
Bloom<
T> - The core read-only reactive state interface in the Bloom reactive DAG engine.
-
BloomController<
T> - Imperative producer controller managing state mutations into the Bloom reactive DAG.
-
BloomCoupler<
T> - A dynamic reactive socket controller that allows hot-coupling or cold-coupling upstream Bloom pipelines at runtime without rebuilding downstream consumers.
- BloomDebugSnapshot
- An immutable structured diagnostic snapshot of a reactive Bloom node, capturing its topology, lifecycle, and reactive state payload.
-
BloomDraftController<
C> - Producer controller managing a reactive state with transactional draft edits.
- BloomGuard
- Represents the decision of a reactive guard evaluation in the Bloom Framework.
- BloomingFunctor
- Callable implementation class for the top-level blooming state creation functor.
- BloomingListFunctor
- Sub-functor managing transactional reactive list state producers (BloomDraftController).
- BloomingMapFunctor
- Sub-functor managing transactional reactive map state producers (BloomDraftController).
- BloomingRawFunctor
- Sub-functor managing unfiltered high-throughput state producers (RawBloomController).
- BloomingSetFunctor
- Sub-functor managing transactional reactive set state producers (BloomDraftController).
- BloomingSignalFunctor
- Sub-functor managing discrete reactive event triggers (BloomSignalController).
- BloomSignal
- A specialized reactive Bloom node representing a discrete event signal.
- BloomSignalController
- Producer controller handle for emitting discrete reactive signals.
-
BloomSnapshot<
T> - An immutable, atomic container that encapsulates the precise state and data of a Bloom node at a specific point in time.
-
BloomState<
T> - The universal reactive state protocol in the Bloom framework.
- BloomUntracked
- The untracked raw-read accessor interface for the Bloom reactive DAG engine.
- BloomVia
- The scoped dependency tracker interface injected into computed, RawViaTerminal, and reactive widget build callbacks.
-
Computation<
T> - An explicit BloomVia-tracking, class-based component computation base class.
- ComputedFunctor
- Callable functor managing synchronous and asynchronous Bloom computations.
- ComputedFutureFunctor
-
Callable functor managing Future-based asynchronous computations (
computed.future). - ComputedStreamFunctor
-
Callable functor managing Stream-based continuous asynchronous computations (
computed.stream). - CustomMatcher
- A base class for Matcher instances that match based on some feature of the value under test.
- Description
- Matchers build up their error messages by appending to Description objects.
- Effect
- A declarative lifecycle-bound side-effect node that executes an untracked action upon upstream mutations.
- EffectDebounceFunctor
- Sub-factory providing declarative debounce rate-limiting Effect creation.
- EffectRunner
- An active standalone execution terminal that imperatively controls the lifecycle of an Effect.
- EffectScope
- An active execution context scope for a scoped Effect run.
- EffectScopedFunctor
- Sub-factory providing declarative Effect creation with scoped lifecycle context (EffectScope).
- EffectThrottleFunctor
- Sub-factory providing declarative throttle rate-limiting Effect creation.
- Graceful
- Represents the graceful deactivation policy for a Bloom node.
-
isInstanceOf<
T> - DEPRECATED Use isA instead.
- LpdagStatus
- A status interface representing the current lifecycle state of an LPDAG node.
- LpdagUncaughtErrorHandler
- Global handler interface for capturing unhandled LPDAG engine exceptions.
- ManagedFunctor
- Callable functor managing synchronous lifecycle-supervised Bloom resources.
- Matcher
- The base class for all matchers.
- OnPlatform
- An annotation for platform-specific customizations for a test suite.
-
RawBloomController<
T> - Raw unfiltered producer controller bypassing distinct checks and supporting manual markDirty.
-
RawBloomTerminal<
T> - A concrete low-level reactive terminal designed specifically for 1:1 Bloom pipelines.
-
RawComputedTerminal<
T> - A reactive terminal that combines dynamic BloomVia dependency tracking with on-demand lazy state resolution, caching, and dirty short-circuiting.
- RawTerminal
- Public contract defining the reactive lifecycle controls of a terminal sink.
-
RawViaTerminal<
T> - A reactive terminal that executes a compute callback with an injected BloomVia explicit dependency manifest handle using Zero-Allocation Epoch Diffing.
- Retry
- An annotation for marking a test suite to be retried.
- Skip
- An annotation for marking a test suite as skipped.
- StreamMatcher
-
A matcher that matches events from Streams or
StreamQueues. - StringDescription
- The default implementation of Description. This should rarely need substitution, although conceivably it is a place where other languages could be supported.
- SwitchedFunctor
- Callable functor managing dynamic topology switching.
- Tags
- An annotation for applying a set of user-defined tags to a test suite.
- TestLocation
- The location of a test or group.
- TestOn
- An annotation indicating which platforms a test suite supports.
- Tether
- Top-level declarative lifecycle-bound entity in the Bloom reactive DAG.
- Throws
- Use the throwsA function instead.
- Timeout
- A class representing a modification to the default timeout for a test.
-
TypeMatcher<
T> - A Matcher subclass that supports validating the Type of the target object.
Enums
- BloomPhase
- The mutually exclusive operational phase of a BloomState.
Mixins
- BloomLifecycleAware
- A mixin for computations to intercept and react to downstream lifecycle state changes.
Extension Types
- BloomDebug
- Zero-cost extension type wrapping Bloom for read-only inspection.
- BloomEffectScope
- Canonical scoped namespace for declarative reactive Effect creation targeting multiple Bloom nodes.
- BloomIterableElements
- A dedicated proxy wrapper for Bloom<Iterable<E>> to perform element-wise transformations safely and defensively.
- BloomKeyedIterableElements
- A dedicated proxy wrapper for Bloom<Iterable<E>> to perform keyed element-wise transformations safely and lazily.
- BloomListElements
- A dedicated proxy wrapper for Bloom<List<E>> to perform list-specific lookup and slicing computations.
- BloomMapElements
- A dedicated proxy wrapper for Bloom<Map<K, V>> to perform map lookup, mapping, and filtering operations.
- BloomSetElements
- A dedicated proxy wrapper for Bloom<Set<E>> to perform set-specific operations while preserving set immutability.
- UnaryBloomEffectScope
- Specialized scoped namespace for declarative reactive Effect creation targeting a single Bloom.
Extensions
- BloomBoolGuardExtension on bool
- Zero-cost compile-time extensions converting booleans into BloomGuard decisions.
-
BloomComputationExtension
on Bloom<
T> - Declarative computation and pipeline transformation operators on Bloom.
-
BloomControllerDebugExtension
on BloomController<
T> - Extension providing zero-overhead debugging capabilities to BloomController producers.
- BloomCouplerDebugExtension on BloomCoupler
- Extension providing zero-overhead debugging capabilities to BloomCoupler dynamic sockets.
-
BloomDebugExtension
on Bloom<
T> - Extension providing zero-overhead debugging capabilities to Bloom reactive nodes.
- BloomEffectExtension on Bloom
- Extension granting a single Bloom node direct access to reactive effect namespaces.
-
BloomIterableBloomExtension
on Bloom<
Iterable< Bloom< >T> > -
Reactive collection operators on a collection of Bloom nodes (
Bloom<Iterable<Bloom<T>>>). -
BloomIterableBloomNumericExtension
on Bloom<
Iterable< Bloom< >T> > - Reactive numeric aggregation extensions on a collection of numeric Bloom nodes.
-
BloomIterableComputationExtension
on Bloom<
Iterable< T> > - Core aggregation extension for Bloom holding any Iterable collection.
-
BloomIterableEffectExtension
on Iterable<
Bloom> - Extension granting collections of Bloom instances access to reactive effect namespaces.
-
BloomIterableElementsExtension
on Bloom<
Iterable< E> > -
Extension on Bloom<Iterable<E>> providing reactive element-wise operations via
.elements. -
BloomKeyedIterableElementsExtension
on Bloom<
Iterable< E> > -
Extension on Bloom<Iterable<E>> providing keyed element-wise transformations via
.keyed. -
BloomListElementsExtension
on Bloom<
List< E> > -
Extension on Bloom<List<E>> providing reactive list-specific index and slicing operations via
.elements. -
BloomMapElementsExtension
on Bloom<
Map< K, V> > -
Extension on Bloom<Map<K, V>> providing reactive map entry transformations and key/value accessors via
.elements. - BloomRecord2EffectExtension on (Bloom, Bloom)
- Extension granting a 2-tuple of Bloom instances access to reactive effect namespaces.
- BloomRecord3EffectExtension on (Bloom, Bloom, Bloom)
- Extension granting a 3-tuple of Bloom instances access to reactive effect namespaces.
- BloomRecord4EffectExtension on (Bloom, Bloom, Bloom, Bloom)
- Extension granting a 4-tuple of Bloom instances access to reactive effect namespaces.
- BloomRecord5EffectExtension on (Bloom, Bloom, Bloom, Bloom, Bloom)
- Extension granting a 5-tuple of Bloom instances access to reactive effect namespaces.
-
BloomSetElementsExtension
on Bloom<
Set< E> > -
Extension on Bloom<Set<E>> providing reactive set operations (union, intersection, difference) via
.elements. - BloomSignalControllerDebugExtension on BloomSignalController
- Extension providing zero-overhead debugging capabilities to BloomSignalController emitters.
-
BloomStateCollectionExtension
on Iterable<
E> - Convenience inspection and filtering methods on an Iterable of objects implementing BloomState.
-
BloomStateCollectionPayloadExtension
on Iterable<
BloomState< T> > - Convenience data extraction extensions on an Iterable of BloomState entities (such as BloomController, BloomSnapshot, RawBloomTerminal, or Computation).
- BloomStateRecord2Extension on (BloomState, BloomState)
- High-performance multi-state inspection and reactive guard extensions on 2-tuples of BloomState.
- BloomStateRecord3Extension on (BloomState, BloomState, BloomState)
- Zero-cost compile-time extensions on 3-tuples of BloomState.
- BloomStateRecord4Extension on (BloomState, BloomState, BloomState, BloomState)
- Zero-cost compile-time extensions on 4-tuples of BloomState.
- BloomStateRecord5Extension on (BloomState, BloomState, BloomState, BloomState, BloomState)
- Zero-cost compile-time extensions on 5-tuples of BloomState.
- BloomStateRecord6Extension on (BloomState, BloomState, BloomState, BloomState, BloomState, BloomState)
- Zero-cost compile-time extensions on 6-tuples of BloomState.
- BloomStateRecord7Extension on (BloomState, BloomState, BloomState, BloomState, BloomState, BloomState, BloomState)
- Zero-cost compile-time extensions on 7-tuples of BloomState.
- BloomStateRecord8Extension on (BloomState, BloomState, BloomState, BloomState, BloomState, BloomState, BloomState, BloomState)
- Zero-cost compile-time extensions on 8-tuples of BloomState.
- BloomStateRecord9Extension on (BloomState, BloomState, BloomState, BloomState, BloomState, BloomState, BloomState, BloomState, BloomState)
- Zero-cost compile-time extensions on 9-tuples of BloomState.
- ComputationDebugExtension on Computation
- Extension providing zero-overhead debugging capabilities to Computation nodes.
- EffectDebugExtension on Effect
- Extension providing zero-overhead debugging capabilities specific to declarative Effect nodes.
-
EffectIterableExtension
on Iterable<
Effect> - Extension granting collections of Effect instances direct grouping into a composite Effect.
- EffectRecord2Extension on (Effect, Effect)
- Extension granting a 2-tuple of Effect instances direct grouping into a composite Effect.
- EffectRecord3Extension on (Effect, Effect, Effect)
- Extension granting a 3-tuple of Effect instances direct grouping into a composite Effect.
- EffectRecord4Extension on (Effect, Effect, Effect, Effect)
- Extension granting a 4-tuple of Effect instances direct grouping into a composite Effect.
- EffectRecord5Extension on (Effect, Effect, Effect, Effect, Effect)
- Extension granting a 5-tuple of Effect instances direct grouping into a composite Effect.
- EffectStartExtension on Effect
- Extension granting declarative Effect instances direct invocation of an EffectRunner.
-
FutureBloomExtension
on Future<
T> - Extension bridging Dart's Future with the reactive Bloom pipeline.
-
FutureFactoryBloomExtension
on Future<
T> Function() -
Extension bridging a lazy Future factory (
Future<T> Function()) with the reactive Bloom pipeline. -
FutureFactoryIterableBloomExtension
on Iterable<
Future< T> Function()> - Extension grouping multiple lazy Future factories into a reactive list of Bloom nodes.
-
FutureIterableBloomExtension
on Iterable<
Future< T> > - Extension grouping multiple Futures into a reactive list of Bloom nodes.
- RawTerminalDebugExtension on RawTerminal
- Extension providing zero-overhead debugging capabilities to RawTerminal sinks.
-
StreamBloomExtension
on Stream<
T> - Extension bridging Dart's Stream with the reactive Bloom pipeline.
-
StreamFactoryBloomExtension
on Stream<
T> Function() -
Extension bridging a lazy Stream factory (
Stream<T> Function()) with the reactive Bloom pipeline. -
StreamFactoryIterableBloomExtension
on Iterable<
Stream< T> Function()> - Extension grouping multiple lazy Stream factories into a reactive list of Bloom nodes.
-
StreamIterableBloomExtension
on Iterable<
Stream< T> > - Extension grouping multiple Streams into a reactive list of Bloom nodes.
- TetherDebugExtension on T
- Extension providing zero-overhead debugging capabilities to declarative Tether nodes.
Constants
- anything → const Matcher
- A matcher that matches any value.
- batch → const BatchFunctor
- Top-level transactional batch functor.
- blooming → const BloomingFunctor
- Core declarative state producer instantiation functor for the Bloom reactive DAG engine.
- computed → const ComputedFunctor
- Core declarative reactive computation functor powered by the 2-Phase Lazy-Pull DAG (LPDAG) engine.
- hasGlitchFreedom → const Matcher
- Matches a reactive node or snapshot sequence verifying that no recorded BloomSnapshot is in an error state.
- isActive → const Matcher
- Matches an LPDAG node (Bloom, BloomController, BloomCoupler, or LpdagStatus) that is currently in an active state (has downstream subscribers).
-
isArgumentError
→ const TypeMatcher<
ArgumentError> - A matcher for ArgumentError.
-
isCastError
→ const TypeMatcher<
TypeError> - A matcher for TypeError.
-
isConcurrentModificationError
→ const TypeMatcher<
ConcurrentModificationError> - A matcher for ConcurrentModificationError.
-
isCyclicInitializationError
→ const TypeMatcher<
Error> - A matcher for Error.
- isDormant → const Matcher
- Matches an LPDAG node (Bloom, BloomController, BloomCoupler, or LpdagStatus) that is currently in a dormant state (0 downstream subscribers, inactive).
- isEmpty → const Matcher
- Returns a matcher that matches the isEmpty property.
-
isException
→ const TypeMatcher<
Exception> - A matcher for Exception.
- isFalse → const Matcher
- A matcher that matches anything except the Boolean value true.
-
isFormatException
→ const TypeMatcher<
FormatException> - A matcher for FormatException.
-
isList
→ const TypeMatcher<
List> - A matcher for List.
-
isMap
→ const TypeMatcher<
Map> - A matcher for Map.
- isNaN → const Matcher
- A matcher that matches the numeric value NaN.
- isNegative → const Matcher
- A matcher which matches if the match argument is negative.
- isNonNegative → const Matcher
- A matcher which matches if the match argument is zero or positive.
- isNonPositive → const Matcher
- A matcher which matches if the match argument is zero or negative.
- isNonZero → const Matcher
- A matcher which matches if the match argument is non-zero.
-
isNoSuchMethodError
→ const TypeMatcher<
NoSuchMethodError> - A matcher for NoSuchMethodError.
- isNotEmpty → const Matcher
- Returns a matcher that matches the isNotEmpty property.
- isNotNaN → const Matcher
- A matcher that matches any non-NaN value.
- isNotNull → const Matcher
- A matcher that matches any non-null value.
- isNull → const Matcher
- A matcher that matches any null value.
-
isNullThrownError
→ const TypeMatcher<
TypeError> - A matcher for TypeError.
- isPositive → const Matcher
- A matcher which matches if the match argument is positive.
-
isRangeError
→ const TypeMatcher<
RangeError> - A matcher for RangeError.
-
isStateError
→ const TypeMatcher<
StateError> - A matcher for StateError.
- isTrue → const Matcher
- A matcher that matches the Boolean value true.
-
isUnimplementedError
→ const TypeMatcher<
UnimplementedError> - A matcher for UnimplementedError.
-
isUnsupportedError
→ const TypeMatcher<
UnsupportedError> - A matcher for UnsupportedError.
- isZero → const Matcher
- A matcher which matches if the match argument is zero.
- managed → const ManagedFunctor
- Core declarative lifecycle supervision functor for external synchronous resources.
- returnsNormally → const Matcher
- A matcher that matches a function call against no exception.
- switched → const SwitchedFunctor
- Core declarative dynamic branching functor for reactive switching across disjoint subgraphs.
- throws → const Matcher
- This function is deprecated.
- throwsArgumentError → const Matcher
- A matcher for functions that throw ArgumentError.
- throwsConcurrentModificationError → const Matcher
- A matcher for functions that throw ConcurrentModificationError.
- throwsCyclicInitializationError → const Matcher
- A matcher for functions that throw CyclicInitializationError.
- throwsException → const Matcher
- A matcher for functions that throw Exception.
- throwsFormatException → const Matcher
- A matcher for functions that throw FormatException.
- throwsNoSuchMethodError → const Matcher
- A matcher for functions that throw NoSuchMethodError.
- throwsNullThrownError → const Matcher
- A matcher for functions that throw NullThrownError.
- throwsRangeError → const Matcher
- A matcher for functions that throw RangeError.
- throwsStateError → const Matcher
- A matcher for functions that throw StateError.
- throwsUnimplementedError → const Matcher
- A matcher for functions that throw Exception.
- throwsUnsupportedError → const Matcher
- A matcher for functions that throw UnsupportedError.
- untracked → const BloomUntracked
- Global untracked accessor singleton.
Properties
- completes → Matcher
-
Matches a Future that completes successfully with any value.
final
- doesNotComplete → Matcher
-
Matches a Future that does not complete.
final
- emitsDone → StreamMatcher
-
Returns a StreamMatcher that asserts that the stream emits a "done" event.
final
- neverCalled → Null Function([Object?, Object?, Object?, Object?, Object?, Object?, Object?, Object?, Object?, Object?])
-
Returns a function that causes the test to fail if it's called.
no setter
Functions
-
addStateInfo(
Map matchState, Map values) → void - Useful utility for nesting match states.
-
addTearDown(
FutureOr callback()) → void - Registers a function to be run after the current test.
-
allOf(
Object? arg0, [Object? arg1, Object? arg2, Object? arg3, Object? arg4, Object? arg5, Object? arg6]) → Matcher - This returns a matcher that matches if all of the matchers passed as arguments (up to 7) match.
-
anyElement(
Object? valueOrMatcher) → Matcher -
Returns a matcher which matches Iterables in which at least one
element matches the given
valueOrMatcher. -
anyOf(
Object? arg0, [Object? arg1, Object? arg2, Object? arg3, Object? arg4, Object? arg5, Object? arg6]) → Matcher - Matches if any of the given matchers evaluate to true.
-
bloomTest<
T> (String description, {required T build(), void seed(T target)?, Bloom target(T target)?, FutureOr< void> act(T target)?, Duration? wait, dynamic expect()?, dynamic errors()?, void verify(T target)?, void tearDown(T target)?, dynamic tags, int? retry, dynamic testOn, Timeout? timeout, bool skip = false}) → void - A declarative, atomic unit test runner tailored specifically for the Bloom reactive framework.
-
closeTo(
num value, num delta) → Matcher -
Returns a matcher which matches if the match argument is within
deltaof somevalue. -
collapseWhitespace(
String string) → String - Utility function to collapse whitespace runs to single spaces and strip leading/trailing whitespace.
-
completion(
Object? matcher, [String? description]) → Matcher -
Matches a Future that completes successfully with a value that matches
matcher. -
contains(
Object? expected) → Matcher - Returns a matcher that matches if the match argument contains the expected value.
-
containsAll(
Iterable expected) → Matcher -
Matches Iterables which contain an element matching every value in
expectedin any order, and may contain additional values. -
containsAllInOrder(
Iterable expected) → Matcher -
Matches Iterables which contain an element matching every value in
expectedin the same order, but may contain additional values interleaved throughout. -
containsOnce(
Object? expected) → Matcher - Matches Iterables where exactly one element matches the expected value, and all other elements don't match.
-
containsPair(
Object? key, Object? valueOrMatcher) → Matcher -
Returns a matcher which matches maps containing the key-value pair
with
key=>valueOrMatcher. -
containsValue(
Object? value) → Matcher -
Returns a matcher which matches maps containing the given
value. -
emits(
Object? matcher) → StreamMatcher -
Returns a StreamMatcher for
matcher. -
emitsAnyOf(
Iterable matchers) → StreamMatcher -
Returns a StreamMatcher that matches the stream if at least one of
matchersmatches. -
emitsError(
Object? matcher) → StreamMatcher -
Returns a StreamMatcher that matches a single error event that matches
matcher. -
emitsInAnyOrder(
Iterable matchers) → StreamMatcher -
Returns a StreamMatcher that matches the stream if each matcher in
matchersmatches, in any order. -
emitsInOrder(
Iterable matchers) → StreamMatcher -
Returns a StreamMatcher that matches the stream if each matcher in
matchersmatches, one after another. -
emitsThrough(
Object? matcher) → StreamMatcher -
Returns a StreamMatcher that matches any number of events followed by
events that match
matcher. -
endsWith(
String suffixString) → Matcher -
Returns a matcher that matches if the match argument is a string and
ends with
suffixString. -
equals(
Object? expected, [int limit = 100]) → Matcher -
Returns a matcher that matches if the value is structurally equal to
expected. -
equalsIgnoringCase(
String value) → Matcher -
Returns a matcher which matches if the match argument is a string and
is equal to
valuewhen compared case-insensitively. -
equalsIgnoringWhitespace(
String value) → Matcher -
Returns a matcher which matches if the match argument is a string and
is equal to
value, ignoring whitespace. -
escape(
String str) → String -
Returns
strwith all whitespace characters represented as their escape sequences. -
everyElement(
Object? valueOrMatcher) → Matcher -
Returns a matcher which matches Iterables in which all elements
match the given
valueOrMatcher. -
expect(
dynamic actual, dynamic matcher, {String? reason, Object? skip, bool verbose = false, ErrorFormatter? formatter}) → void -
Assert that
actualmatchesmatcher. -
expectAsync(
Function callback, {int count = 1, int max = 0, String? id, String? reason}) → Function - This function is deprecated because it doesn't work well with strong mode. Use expectAsync0, expectAsync1, expectAsync2, expectAsync3, expectAsync4, expectAsync5, or expectAsync6 instead.
-
expectAsync0<
T> (T callback(), {int count = 1, int max = 0, String? id, String? reason}) → Func0< T> -
Informs the framework that the given
callbackof arity 0 is expected to be calledcountnumber of times (by default 1). -
expectAsync1<
T, A> (T callback(A), {int count = 1, int max = 0, String? id, String? reason}) → Func1< T, A> -
Informs the framework that the given
callbackof arity 1 is expected to be calledcountnumber of times (by default 1). -
expectAsync2<
T, A, B> (T callback(A, B), {int count = 1, int max = 0, String? id, String? reason}) → Func2< T, A, B> -
Informs the framework that the given
callbackof arity 2 is expected to be calledcountnumber of times (by default 1). -
expectAsync3<
T, A, B, C> (T callback(A, B, C), {int count = 1, int max = 0, String? id, String? reason}) → Func3< T, A, B, C> -
Informs the framework that the given
callbackof arity 3 is expected to be calledcountnumber of times (by default 1). -
expectAsync4<
T, A, B, C, D> (T callback(A, B, C, D), {int count = 1, int max = 0, String? id, String? reason}) → Func4< T, A, B, C, D> -
Informs the framework that the given
callbackof arity 4 is expected to be calledcountnumber of times (by default 1). -
expectAsync5<
T, A, B, C, D, E> (T callback(A, B, C, D, E), {int count = 1, int max = 0, String? id, String? reason}) → Func5< T, A, B, C, D, E> -
Informs the framework that the given
callbackof arity 5 is expected to be calledcountnumber of times (by default 1). -
expectAsync6<
T, A, B, C, D, E, F> (T callback(A, B, C, D, E, F), {int count = 1, int max = 0, String? id, String? reason}) → Func6< T, A, B, C, D, E, F> -
Informs the framework that the given
callbackof arity 6 is expected to be calledcountnumber of times (by default 1). -
expectAsyncUntil0<
T> (T callback(), bool isDone(), {String? id, String? reason}) → Func0< T> -
Informs the framework that the given
callbackof arity 0 is expected to be called untilisDonereturns true. -
expectAsyncUntil1<
T, A> (T callback(A), bool isDone(), {String? id, String? reason}) → Func1< T, A> -
Informs the framework that the given
callbackof arity 1 is expected to be called untilisDonereturns true. -
expectAsyncUntil2<
T, A, B> (T callback(A, B), bool isDone(), {String? id, String? reason}) → Func2< T, A, B> -
Informs the framework that the given
callbackof arity 2 is expected to be called untilisDonereturns true. -
expectAsyncUntil3<
T, A, B, C> (T callback(A, B, C), bool isDone(), {String? id, String? reason}) → Func3< T, A, B, C> -
Informs the framework that the given
callbackof arity 3 is expected to be called untilisDonereturns true. -
expectAsyncUntil4<
T, A, B, C, D> (T callback(A, B, C, D), bool isDone(), {String? id, String? reason}) → Func4< T, A, B, C, D> -
Informs the framework that the given
callbackof arity 4 is expected to be called untilisDonereturns true. -
expectAsyncUntil5<
T, A, B, C, D, E> (T callback(A, B, C, D, E), bool isDone(), {String? id, String? reason}) → Func5< T, A, B, C, D, E> -
Informs the framework that the given
callbackof arity 5 is expected to be called untilisDonereturns true. -
expectAsyncUntil6<
T, A, B, C, D, E, F> (T callback(A, B, C, D, E, F), bool isDone(), {String? id, String? reason}) → Func6< T, A, B, C, D, E, F> -
Informs the framework that the given
callbackof arity 6 is expected to be called untilisDonereturns true. -
expectLater(
dynamic actual, dynamic matcher, {String? reason, Object? skip}) → Future - Just like expect, but returns a Future that completes when the matcher has finished matching.
-
fail(
String message) → Never -
Convenience method for throwing a new TestFailure with the provided
message. -
greaterThan(
Object value) → Matcher -
Returns a matcher which matches if the match argument is greater
than the given
value. -
greaterThanOrEqualTo(
Object value) → Matcher -
Returns a matcher which matches if the match argument is greater
than or equal to the given
value. -
group(
Object? description, void body(), {String? testOn, Timeout? timeout, Object? skip, Object? tags, Map< String, dynamic> ? onPlatform, int? retry, TestLocation? location, bool solo = false}) → void - Creates a group of tests.
-
hasLength(
Object? matcher) → Matcher -
Returns a matcher that matches if an object has a length property
that matches
matcher. -
hasSubscribers(
int count) → Matcher -
Creates a matcher that asserts a Bloom, BloomController, or BloomCoupler node
has exactly
countactive downstream subscribers. -
inClosedOpenRange(
num low, num high) → Matcher -
Returns a matcher which matches if the match argument is greater
than or equal to a
lowand less thanhigh. -
inExclusiveRange(
num low, num high) → Matcher -
Returns a matcher which matches if the match argument is greater
than
lowand less thanhigh. -
inInclusiveRange(
num low, num high) → Matcher -
Returns a matcher which matches if the match argument is greater
than or equal to
lowand less than or equal tohigh. -
inOpenClosedRange(
num low, num high) → Matcher -
Returns a matcher which matches if the match argument is greater
than
lowand less than or equal tohigh. -
isA<
T> () → TypeMatcher< T> -
Returns a matcher that matches objects with type
T. -
isData(
dynamic expected) → Matcher -
Creates a matcher verifying that a BloomSnapshot, BloomState, Bloom, or BloomController
is in a valid Data state and matches
expected. -
isEmptyState(
[Object? reason]) → Matcher -
Creates a matcher verifying that a BloomSnapshot, BloomState, Bloom, or BloomController
is in an Empty state, optionally verifying
reason. -
isErrorState(
[dynamic error]) → Matcher -
Creates a matcher verifying that a BloomSnapshot, BloomState, Bloom, or BloomController
is in an Error state, optionally matching
error. -
isIn(
Object? expected) → Matcher - Returns a matcher that matches if the match argument is in the expected value. This is the converse of contains.
-
isNot(
Object? valueOrMatcher) → Matcher -
Returns a matcher that inverts
valueOrMatcherto its logical negation. -
isSorted<
T extends Comparable< (T> >) → Matcher - Matches Iterables which are sorted.
-
isSortedBy<
T, K extends Comparable< (K> >K keyOf(T)) → Matcher -
Matches Iterables which are sorted by the
keyOfproperty. -
isSortedByCompare<
T, K> (K keyOf(T), Comparator< K> compare) → Matcher -
Matches Iterables which are
compare-sorted by theirkeyOfproperty. -
isSortedUsing<
T> (Comparator< T> compare) → Matcher -
Matches Iterables which are
compare-sorted. -
lessThan(
Object value) → Matcher -
Returns a matcher which matches if the match argument is less
than the given
value. -
lessThanOrEqualTo(
Object value) → Matcher -
Returns a matcher which matches if the match argument is less
than or equal to the given
value. -
markTestSkipped(
String message) → void - Marks the current test as skipped.
-
matches(
Pattern re) → Matcher -
Returns a matcher that matches if the match argument is a string and
matches the regular expression given by
re. -
mayEmit(
Object? matcher) → StreamMatcher -
Returns a StreamMatcher that allows (but doesn't require)
matcherto match the stream. -
mayEmitMultiple(
Object? matcher) → StreamMatcher -
Returns a StreamMatcher that matches any number of events that match
matcher. -
neverEmits(
Object? matcher) → StreamMatcher -
Returns a StreamMatcher that matches a stream that never matches
matcher. -
orderedEquals(
Iterable expected) → Matcher -
Returns a matcher which matches Iterables that have the same
length and the same elements as
expected, in the same order. -
pairwiseCompare<
S, T> (Iterable< S> expected, bool comparator(S, T), String description) → Matcher - A pairwise matcher for Iterables.
-
predicate<
T> (bool f(T), [String description = 'satisfies function']) → Matcher - Returns a matcher that uses an arbitrary function that returns whether the value is considered a match.
-
printOnFailure(
String message) → void -
Prints
messageif and when the current test fails. -
prints(
Object? matcher) → Matcher -
Matches a Function that prints text that matches
matcher. -
pumpEventQueue(
{int times = 20}) → Future -
Returns a Future that completes after the event loop has run the given
number of
times(20 by default). -
registerException(
Object error, [StackTrace stackTrace = StackTrace.empty]) → void - Registers an exception that was caught for the current test.
-
same(
Object? expected) → Matcher -
Returns a matches that matches if the value is the same instance
as
expected, using identical. -
setUp(
FutureOr callback()) → void - Registers a function to be run before tests.
-
setUpAll(
FutureOr callback(), {TestLocation? location}) → void - Registers a function to be run once before all tests.
-
spawnHybridCode(
String dartCode, {Object? message, bool stayAlive = false}) → StreamChannel -
Spawns a VM isolate that runs the given
dartCode, which is loaded as the contents of a Dart library. -
spawnHybridUri(
Object uri, {Object? message, bool stayAlive = false}) → StreamChannel -
Spawns a VM isolate for the given
uri, which may be a Uri or a String. -
startsWith(
String prefixString) → Matcher -
Returns a matcher that matches if the match argument is a string and
starts with
prefixString. -
stringContainsInOrder(
List< String> substrings) → Matcher -
Returns a matcher that matches if the match argument is a string and
contains a given list of
substringsin relative order. -
tearDown(
FutureOr callback()) → void - Registers a function to be run after tests.
-
tearDownAll(
FutureOr callback(), {TestLocation? location}) → void - Registers a function to be run once after all tests.
-
test(
Object? description, FutureOr body(), {String? testOn, Timeout? timeout, Object? skip, Object? tags, Map< String, dynamic> ? onPlatform, int? retry, TestLocation? location, bool solo = false}) → void - Creates a new test case with the given description (converted to a string) and body.
-
throwsA(
Object? matcher) → Matcher - This can be used to match three kinds of objects:
-
unorderedEquals(
Iterable expected) → Matcher -
Returns a matcher which matches Iterables that have the same length and
the same elements as
expected, but not necessarily in the same order. -
unorderedMatches(
Iterable expected) → Matcher -
Returns a matcher which matches Iterables whose elements match the
matchers in
expected, but not necessarily in the same order. -
wrapMatcher(
Object? valueOrMatcher) → Matcher - Takes an argument and returns an equivalent Matcher.
Typedefs
- ErrorFormatter = String Function(Object? actual, Matcher matcher, String? reason, Map matchState, bool verbose)
- The type used for functions that can be used to build up error reports upon failures in expect.
-
Func0<
T> = T Function() -
Func1<
T, A> = T Function([A a]) -
Func2<
T, A, B> = T Function([A a, B b]) -
Func3<
T, A, B, C> = T Function([A a, B b, C c]) -
Func4<
T, A, B, C, D> = T Function([A a, B b, C c, D d]) -
Func5<
T, A, B, C, D, E> = T Function([A a, B b, C c, D d, E e]) -
Func6<
T, A, B, C, D, E, F> = T Function([A a, B b, C c, D d, E e, F f])
Exceptions / Errors
- BloomEmptyExtractionException
- Thrown when attempting to extract payload (.data) from an Empty state or snapshot.
- BloomErrorExtractionException
- Thrown when attempting to extract payload (.data) from an Error state or snapshot.
- BloomException
- The base class for all recoverable runtime exceptions in the Bloom state domain.
- BloomSnapshotExtractionException
- Thrown when an attempt is made to extract data from an invalid snapshot state.
- BloomSnapshotStateException
- Thrown when attempting to query error or stack trace metadata from a non-error snapshot.
- LpdagCycleError
- Thrown when a synchronous cyclic evaluation loop is detected during state resolution or pull.
- LpdagReentrancyError
- Thrown when a synchronous cyclic reentrancy loop is detected during dirty propagation.
- TestFailure
- An exception thrown when a test assertion fails.