Meshtastic-Android/core/testing/src
James Rich 1d258daded test(notifications): add unit tests for reply/markAsRead/reaction receivers
Adds Robolectric-based androidHostTest coverage for the three notification
BroadcastReceivers. Verifies:

- ReplyReceiver sends a DataPacket derived from the contactKey then calls
  appendOutgoingMessage followed by markConversationRead in that order.
- MarkAsReadReceiver invokes markConversationRead, ignores wrong actions,
  and drops intents missing the contact key.
- ReactionReceiver dispatches a ServiceAction.Reaction and, on success,
  calls markConversationRead. Failures in dispatch short-circuit markRead.

Uses the existing FakeRadioController and FakeMeshServiceNotifications
(marked open so tests can record calls) plus mokkery for ServiceRepository,
mirroring the pattern in SendMessageWorkerTest. Fakes are wired through a
per-test Koin graph to match each receiver's KoinComponent injection.

Also fixes a pre-existing compile break in MeshServiceNotificationsImplTest
that was missing the shortcutManager constructor argument.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-17 09:51:00 -05:00
..
androidMain/kotlin/org/meshtastic/core/testing Refactor map layer management and navigation infrastructure (#4921) 2026-03-26 00:29:24 +00:00
commonMain/kotlin/org/meshtastic/core/testing test(notifications): add unit tests for reply/markAsRead/reaction receivers 2026-04-17 09:51:00 -05:00
commonTest/kotlin/org/meshtastic/core/testing Refactor map layer management and navigation infrastructure (#4921) 2026-03-26 00:29:24 +00:00
iosMain/kotlin/org/meshtastic/core/testing Refactor map layer management and navigation infrastructure (#4921) 2026-03-26 00:29:24 +00:00
jvmMain/kotlin/org/meshtastic/core/testing Refactor map layer management and navigation infrastructure (#4921) 2026-03-26 00:29:24 +00:00