Fix compilation issue in tests.
This commit is contained in:
parent
3f9c0bd70d
commit
cb228d35e9
2 changed files with 7 additions and 1 deletions
|
|
@ -18,6 +18,7 @@ import io.mockk.verify
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.junit.runner.RunWith
|
import org.junit.runner.RunWith
|
||||||
import org.robolectric.RobolectricTestRunner
|
import org.robolectric.RobolectricTestRunner
|
||||||
|
import org.robolectric.RuntimeEnvironment
|
||||||
import org.robolectric.annotation.Config
|
import org.robolectric.annotation.Config
|
||||||
|
|
||||||
@RunWith(RobolectricTestRunner::class)
|
@RunWith(RobolectricTestRunner::class)
|
||||||
|
|
@ -66,5 +67,6 @@ class NotificationChannelsTest {
|
||||||
) = DefaultNotificationChannels(
|
) = DefaultNotificationChannels(
|
||||||
notificationManager = notificationManager,
|
notificationManager = notificationManager,
|
||||||
stringProvider = FakeStringProvider(),
|
stringProvider = FakeStringProvider(),
|
||||||
|
context = RuntimeEnvironment.getApplication(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -332,5 +332,9 @@ fun createNotificationCreator(
|
||||||
|
|
||||||
fun createNotificationChannels(): NotificationChannels {
|
fun createNotificationChannels(): NotificationChannels {
|
||||||
val context = RuntimeEnvironment.getApplication()
|
val context = RuntimeEnvironment.getApplication()
|
||||||
return DefaultNotificationChannels(NotificationManagerCompat.from(context), FakeStringProvider(""))
|
return DefaultNotificationChannels(
|
||||||
|
notificationManager = NotificationManagerCompat.from(context),
|
||||||
|
stringProvider = FakeStringProvider(""),
|
||||||
|
context = context,
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue