MockRepository class

Mock repository for testing.

Inheritance

Constructors

MockRepository()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear({String? userId}) Future<void>
Deletes all the entries of the repository. If userId is not null, the only enties that will be deleted will have the same user id.
override
count({String? userId, Where? where}) Future<int>
Returns the number of entries in the repository.
override
create({String? wantedId}) Future<Model>
Creates a new entry in the repository.
override
delete(Model item) Future<void>
Deletes an entry in the repository.
override
deleteWhere(Where where) Future<void>
Deletes all the entries that are compliant to the where clause.
override
get(String id) Future<Model>
Returns the entry with the specified id.
override
getAll({String? userId, Where? where, String? orderBy, bool descending = true}) Future<List<Model>>
Returns all the entries in the repository. If userId is not null, the results will have the same user id. If where is not null, the results will be compliant to the where clause.
override
initialize() Future<void>
Initialize the repository.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
update(Model item) Future<void>
Updates an entry in the repository.
override

Operators

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