MockByteStream class
Mocks a Stream<List<int>>.
Constructors
-
MockByteStream(List<
int> bytes, int maxLength, {Duration? minDelay, Duration? maxDelay, bool hasError = false, ErrorPosition? errorPosition})
Properties
-
bytes
→ List<
int> -
The byte source.
final
- errorPosition → ErrorPosition?
-
Determines where the error will be thrown.
final
- hasError → bool
-
If true, the resulting stream will throw an exception.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxDelay → Duration?
-
Maximum delay between responses.
final
- maxLength → int
-
Max length of bytes of each response.
final
- minDelay → Duration?
-
Minimum delay between responses.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
stream(
) → Stream< List< int> > - Gets the resulting stream instance.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited