Skip to content

Commit b92f82d

Browse files
committed
Fix tests
1 parent 5699696 commit b92f82d

File tree

2 files changed

+20
-28
lines changed

2 files changed

+20
-28
lines changed

sentry/src/test/java/io/sentry/SentryReplayOptionsTest.java

Lines changed: 0 additions & 28 deletions
This file was deleted.

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

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,24 @@ class SentryReplayOptionsTest {
3434
assertEquals(100_000, replayOptions.quality.bitRate)
3535
assertEquals(1.0f, replayOptions.quality.sizeScale)
3636
}
37+
38+
@Test
39+
fun testDefaultScreenshotStrategy() {
40+
val options = SentryReplayOptions(false, null)
41+
assertEquals(ScreenshotStrategyType.PIXEL_COPY, options.getScreenshotStrategy())
42+
}
43+
44+
@Test
45+
fun testSetScreenshotStrategyToCanvas() {
46+
val options = SentryReplayOptions(false, null)
47+
options.screenshotStrategy = ScreenshotStrategyType.CANVAS
48+
assertEquals(ScreenshotStrategyType.CANVAS, options.getScreenshotStrategy())
49+
}
50+
51+
@Test
52+
fun testSetScreenshotStrategyToPixelCopy() {
53+
val options = SentryReplayOptions(false, null)
54+
options.screenshotStrategy = ScreenshotStrategyType.PIXEL_COPY
55+
assertEquals(ScreenshotStrategyType.PIXEL_COPY, options.getScreenshotStrategy())
56+
}
3757
}

0 commit comments

Comments
 (0)