Skip to content

Commit 85e8902

Browse files
committed
RUM-8630: test support
1 parent 00851d5 commit 85e8902

File tree

1 file changed

+13
-0
lines changed
  • features/dd-sdk-android-rum/src/test/kotlin/com/datadog/android/rum/internal/domain/scope

1 file changed

+13
-0
lines changed

features/dd-sdk-android-rum/src/test/kotlin/com/datadog/android/rum/internal/domain/scope/RumViewScopeTest.kt

+13
Original file line numberDiff line numberDiff line change
@@ -6101,6 +6101,19 @@ internal class RumViewScopeTest {
61016101

61026102
// region Long Task
61036103

6104+
@Test
6105+
fun `M call onAddLongTask of slowFramesListener W handleEvent(AddLongTask)`(
6106+
@LongForgery(0L, 700_000_000L) durationNs: Long,
6107+
@StringForgery target: String
6108+
) {
6109+
testedScope.activeActionScope = null
6110+
fakeEvent = RumRawEvent.AddLongTask(durationNs, target)
6111+
6112+
testedScope.handleEvent(fakeEvent, mockWriter)
6113+
6114+
verify(mockSlowFramesListener).onAddLongTask(durationNs)
6115+
}
6116+
61046117
@Test
61056118
fun `M send event W handleEvent(AddLongTask) on active view {not frozen}`(
61066119
@LongForgery(0L, 700_000_000L) durationNs: Long,

0 commit comments

Comments
 (0)