Skip to content

Commit 9613ba7

Browse files
committed
fix: Test expected exception
1 parent b4f8da1 commit 9613ba7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sentry-android/src/test/java/io/sentry/android/SentryInitProviderTest.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import kotlin.test.BeforeTest
1010
import kotlin.test.Test
1111
import kotlin.test.assertFalse
1212
import kotlin.test.assertTrue
13+
import kotlin.test.assertFailsWith
1314

1415
@RunWith(AndroidJUnit4::class)
1516
class SentryInitProviderTest {
@@ -27,8 +28,8 @@ class SentryInitProviderTest {
2728
fun `when missing applicationId, SentryInitProvider throws`() {
2829
val providerInfo = ProviderInfo()
2930

30-
providerInfo.authority = "io.sentry.android.SentryInitProvider"
31-
sentryInitProvider.attachInfo(context, providerInfo)
31+
providerInfo.authority = "io.sentry.SentryInitProvider"
32+
assertFailsWith<IllegalStateException> { sentryInitProvider.attachInfo(context, providerInfo) }
3233
}
3334

3435
@Test

0 commit comments

Comments
 (0)