RiftTestUtil class

Testing utilities for Rift database. Makes it easy to write unit and integration tests.

Constructors

RiftTestUtil()

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

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

cleanUp(List<String> boxNames) Future<void>
Clean up all test boxes by deleting them from disk.
createSeededBox<E>(String name, int count, E generator(int index)) Future<Box<E>>
Create a box pre-filled with test data. count items are generated using generator.
createTestBox<E>(String name, {Map<dynamic, E>? seedData}) Future<Box<E>>
Create an in-memory box for testing. Optionally seed it with seedData.
expectBoxContains(Box box, Map expected) → void
Assert that a box contains specific data. Throws an exception if any key-value pair doesn't match.
expectBoxDoesNotHaveKey(Box box, dynamic key) → void
Assert that a box does not contain a specific key.
expectBoxHasKey(Box box, dynamic key) → void
Assert that a box contains a specific key.
expectBoxLength(Box box, int expectedLength) → void
Assert that a box has a specific number of entries.