Skip to content

Commit a991803

Browse files
committed
Improve test coverage
1 parent d10308e commit a991803

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

sentry/src/test/java/io/sentry/SentryOptionsTest.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package io.sentry
22

33
import io.sentry.SentryOptions.RequestSize
4+
import io.sentry.logger.ILoggerBatchProcessorFactory
45
import io.sentry.util.StringUtils
56
import java.io.File
67
import java.net.Proxy
@@ -12,6 +13,7 @@ import kotlin.test.assertIs
1213
import kotlin.test.assertNotEquals
1314
import kotlin.test.assertNotNull
1415
import kotlin.test.assertNull
16+
import kotlin.test.assertSame
1517
import kotlin.test.assertTrue
1618
import org.mockito.kotlin.eq
1719
import org.mockito.kotlin.mock
@@ -908,4 +910,12 @@ class SentryOptionsTest {
908910
options.maxFeatureFlags = 50
909911
assertEquals(50, options.maxFeatureFlags)
910912
}
913+
914+
@Test
915+
fun `loggerBatchFactory can be changed`() {
916+
val mock = mock<ILoggerBatchProcessorFactory>()
917+
val options = SentryOptions()
918+
options.logs.loggerBatchProcessorFactory = mock
919+
assertSame(mock, options.logs.loggerBatchProcessorFactory)
920+
}
911921
}

0 commit comments

Comments
 (0)