1package com.peachpasswords.sync23import org.junit.Assert.assertFalse4import org.junit.Assert.assertTrue5import org.junit.Test67class SyncNotificationPersistenceTest {8 @Test9 fun `user dismissal restores the notification while background sync is enabled`() {10 assertTrue(11 shouldRestoreSyncNotification(12 ACTION_RESTORE_SYNC_NOTIFICATION,13 backgroundSyncEnabled = true,14 ),15 )16 }1718 @Test19 fun `disabled background sync never restores a dismissed notification`() {20 assertFalse(21 shouldRestoreSyncNotification(22 ACTION_RESTORE_SYNC_NOTIFICATION,23 backgroundSyncEnabled = false,24 ),25 )26 }2728 @Test29 fun `unrelated broadcasts cannot restore the notification`() {30 assertFalse(31 shouldRestoreSyncNotification(32 "com.peachpasswords.action.UNRELATED",33 backgroundSyncEnabled = true,34 ),35 )36 }37}