Skip to content

Commit c57ef26

Browse files
committed
Add action array size assertions
1 parent 1e2a813 commit c57ef26

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
@@ -356,6 +356,7 @@ internal class TwoMediaProductsPlayLogTest {
356356
.isAssetPositionEqualTo(MEDIA_PRODUCT_1_DURATION_SECONDS)
357357
assertThat(startAction.timestamp)
358358
.isBetween(perfectResumeTimestamp - 500, perfectResumeTimestamp + 500)
359+
assertThat(size()).isEqualTo(2)
359360
}
360361
},
361362
1 to {
@@ -618,6 +619,7 @@ internal class TwoMediaProductsPlayLogTest {
618619
perfectSecondResumeTimestamp - 500,
619620
perfectSecondResumeTimestamp + 500,
620621
)
622+
assertThat(size()).isEqualTo(4)
621623
}
622624
},
623625
1 to {
@@ -647,6 +649,7 @@ internal class TwoMediaProductsPlayLogTest {
647649
assertThat(startAction.assetPositionSeconds).isAssetPositionEqualTo(58.0)
648650
assertThat(startAction.timestamp)
649651
.isBetween(perfectResumeTimestamp - 500, perfectResumeTimestamp + 500)
652+
assertThat(size()).isEqualTo(2)
650653
}
651654
},
652655
1 to {

0 commit comments

Comments
 (0)