ZenTestContainer class

Test container for integration and widget testing

Constructors

ZenTestContainer.new({String? name})

Properties

hashCode int
The hash code for this object.
no setterinherited
isDisposed bool
Check if the container is disposed
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scope ZenScope
Get the test scope
no setter

Methods

clear() → void
Clear all dependencies
delete<T>({String? tag, bool force = false}) bool
Delete a dependency
dispose() → void
Dispose all dependencies in the test container
exists<T>({String? tag}) bool
Check if a dependency exists
find<T>({String? tag}) → T?
Find a dependency from the test container
get<T>({String? tag}) → T
Find a dependency and throw if not found
getAllDependencies() List
Get all registered dependencies
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
put<T>(T instance, {String? tag, bool? permanent}) → T
Register an existing instance
putFactory<T>(T factory(), {String? tag}) → void
Register a factory function
putLazy<T>(T factory(), {String? tag}) → void
Register a lazy factory
register<T>(T factory(), {String? tag, bool? permanent}) → T
Register a dependency or controller
toString() String
A string representation of this object.
inherited

Operators

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