Fix compilation issue in tests.

This commit is contained in:
Benoit Marty
2025-10-07 16:49:51 +02:00
parent 3f9c0bd70d
commit cb228d35e9
2 changed files with 7 additions and 1 deletions

View File

@@ -18,6 +18,7 @@ import io.mockk.verify
import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
import org.robolectric.RuntimeEnvironment
import org.robolectric.annotation.Config
@RunWith(RobolectricTestRunner::class)
@@ -66,5 +67,6 @@ class NotificationChannelsTest {
) = DefaultNotificationChannels(
notificationManager = notificationManager,
stringProvider = FakeStringProvider(),
context = RuntimeEnvironment.getApplication(),
)
}

View File

@@ -332,5 +332,9 @@ fun createNotificationCreator(
fun createNotificationChannels(): NotificationChannels {
val context = RuntimeEnvironment.getApplication()
return DefaultNotificationChannels(NotificationManagerCompat.from(context), FakeStringProvider(""))
return DefaultNotificationChannels(
notificationManager = NotificationManagerCompat.from(context),
stringProvider = FakeStringProvider(""),
context = context,
)
}