package com.rssuper.services import com.rssuper.models.NotificationPreferences import org.junit.Assert.assertEquals import org.junit.Assert.assertFalse import org.junit.Assert.assertNotNull import org.junit.Assert.assertTrue import org.junit.Test class NotificationServiceTest { @Test fun testNotificationPreferencesDefaultValues() { val preferences = NotificationPreferences() assertEquals(true, preferences.newArticles) assertEquals(true, preferences.episodeReleases) assertEquals(false, preferences.customAlerts) assertEquals(true, preferences.badgeCount) assertEquals(true, preferences.sound) assertEquals(true, preferences.vibration) } @Test fun testNotificationPreferencesCopy() { val original = NotificationPreferences( newArticles = true, sound = true ) val modified = original.copy(newArticles = false, sound = false) assertEquals(false, modified.newArticles) assertEquals(false, modified.sound) assertEquals(true, modified.episodeReleases) } @Test fun testNotificationPreferencesEquals() { val pref1 = NotificationPreferences(newArticles = true, sound = true) val pref2 = NotificationPreferences(newArticles = true, sound = true) val pref3 = NotificationPreferences(newArticles = false, sound = true) assertEquals(pref1, pref2) assert(pref1 != pref3) } @Test fun testNotificationPreferencesToString() { val preferences = NotificationPreferences( newArticles = true, sound = true ) val toString = preferences.toString() assertNotNull(toString) assertTrue(toString.contains("newArticles")) assertTrue(toString.contains("sound")) } }