objectbox / objectbox/objectbox-dart
Testable and Immutability of ObjectBox
Open
@greenrobot-team is already working on this.
Since Jul 5, 2022.
enhancement
- Dominant language
- Dart
- Stars
- 1.2k
- Forks
- 162
- Avg merge
- 15m
- Merged PRs (30d)
- 1
Description
Request
Make ObjectBox object is suitable to unit tests
Override Equality of Condition and implementations of Condition
Thus following code can work
verify(() => mockBox.query(Entity_.id.equals(id))).called(1);
and use const constructor for ObjectBoxException
/// ObjectBox database exception.
class ObjectBoxException implements Exception {
/// Exception message.
final String message;
/// Create a new exception.
ObjectBoxException(this.message); // <--- add const
@override
String toString() => 'ObjectBoxException: $message';
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.