objectbox / objectbox/objectbox-dart

Testable and Immutability of ObjectBox

Open
#304 1 comment 1 reaction 1 assignee View on GitHub

@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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.