Skip to content

Commit b2d5a47

Browse files
committed
Add action array size assertions
1 parent 90c3126 commit b2d5a47

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

player/src/androidTest/kotlin/com/tidal/sdk/player/playlog/SingleMediaProductPlayLogTest.kt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ internal class SingleMediaProductPlayLogTest {
248248
1.seconds.inWholeMilliseconds
249249
assertThat(startAction.timestamp)
250250
.isBetween(perfectResumeTimestamp - 500, perfectResumeTimestamp + 500)
251+
assertThat(size()).isEqualTo(2)
251252
}
252253
}
253254
true
@@ -303,6 +304,7 @@ internal class SingleMediaProductPlayLogTest {
303304
val perfectResumeTimestamp = stopAction.timestamp
304305
assertThat(startAction.timestamp)
305306
.isBetween(perfectResumeTimestamp - 500, perfectResumeTimestamp + 500)
307+
assertThat(size()).isEqualTo(2)
306308
}
307309
}
308310
true
@@ -357,6 +359,7 @@ internal class SingleMediaProductPlayLogTest {
357359
val perfectResumeTimestamp = stopAction.timestamp
358360
assertThat(startAction.timestamp)
359361
.isBetween(perfectResumeTimestamp - 500, perfectResumeTimestamp + 500)
362+
assertThat(size()).isEqualTo(2)
360363
}
361364
}
362365
true
@@ -413,6 +416,7 @@ internal class SingleMediaProductPlayLogTest {
413416
val perfectResumeTimestamp = stopAction.timestamp
414417
assertThat(startAction.timestamp)
415418
.isBetween(perfectResumeTimestamp - 500, perfectResumeTimestamp + 500)
419+
assertThat(size()).isEqualTo(2)
416420
}
417421
}
418422
true
@@ -469,6 +473,7 @@ internal class SingleMediaProductPlayLogTest {
469473
val perfectResumeTimestamp = stopAction.timestamp
470474
assertThat(startAction.timestamp)
471475
.isBetween(perfectResumeTimestamp - 500, perfectResumeTimestamp + 500)
476+
assertThat(size()).isEqualTo(2)
472477
}
473478
}
474479
true
@@ -553,6 +558,7 @@ internal class SingleMediaProductPlayLogTest {
553558
perfectSecondResumeTimestamp - 500,
554559
perfectSecondResumeTimestamp + 500,
555560
)
561+
assertThat(size()).isEqualTo(4)
556562
}
557563
}
558564
true
@@ -631,6 +637,7 @@ internal class SingleMediaProductPlayLogTest {
631637
perfectSecondResumeTimestamp - 500,
632638
perfectSecondResumeTimestamp + 500,
633639
)
640+
assertThat(size()).isEqualTo(4)
634641
}
635642
}
636643
true
@@ -819,6 +826,7 @@ internal class SingleMediaProductPlayLogTest {
819826
val perfectResumeTimestamp = stopAction.timestamp
820827
assertThat(startAction.timestamp)
821828
.isBetween(perfectResumeTimestamp - 500, perfectResumeTimestamp + 500)
829+
assertThat(size()).isEqualTo(2)
822830
}
823831
}
824832
true
@@ -882,6 +890,7 @@ internal class SingleMediaProductPlayLogTest {
882890
.isAssetPositionEqualTo(MEDIA_PRODUCT_DURATION_SECONDS)
883891
assertThat(startAction.timestamp)
884892
.isBetween(perfectResumeTimestamp - 500, perfectResumeTimestamp + 500)
893+
assertThat(size()).isEqualTo(2)
885894
}
886895
},
887896
1 to {

player/src/androidTest/kotlin/com/tidal/sdk/player/playlog/TwoMediaProductsPlayLogTest.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,7 @@ internal class TwoMediaProductsPlayLogTest {
355355
.isAssetPositionEqualTo(MEDIA_PRODUCT_1_DURATION_SECONDS)
356356
assertThat(startAction.timestamp)
357357
.isBetween(perfectResumeTimestamp - 500, perfectResumeTimestamp + 500)
358+
assertThat(size()).isEqualTo(2)
358359
}
359360
},
360361
1 to {
@@ -611,6 +612,7 @@ internal class TwoMediaProductsPlayLogTest {
611612
perfectSecondResumeTimestamp - 500,
612613
perfectSecondResumeTimestamp + 500,
613614
)
615+
assertThat(size()).isEqualTo(4)
614616
}
615617
},
616618
1 to {
@@ -640,6 +642,7 @@ internal class TwoMediaProductsPlayLogTest {
640642
assertThat(startAction.assetPositionSeconds).isAssetPositionEqualTo(58.0)
641643
assertThat(startAction.timestamp)
642644
.isBetween(perfectResumeTimestamp - 500, perfectResumeTimestamp + 500)
645+
assertThat(size()).isEqualTo(2)
643646
}
644647
},
645648
1 to {

0 commit comments

Comments
 (0)