Fix typo
PiperOrigin-RevId: 368789636
This commit is contained in:
parent
b0260f7cb8
commit
66e4e47e1a
@ -28,14 +28,14 @@ import org.junit.runner.RunWith;
|
|||||||
public class ExoPlaybackExceptionTest {
|
public class ExoPlaybackExceptionTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void roundtripViaBundle_ofExoPlaybackExceptionTypeRemote_yieldsEqualInstance() {
|
public void roundTripViaBundle_ofExoPlaybackExceptionTypeRemote_yieldsEqualInstance() {
|
||||||
ExoPlaybackException before = ExoPlaybackException.createForRemote(/* message= */ "test");
|
ExoPlaybackException before = ExoPlaybackException.createForRemote(/* message= */ "test");
|
||||||
ExoPlaybackException after = ExoPlaybackException.CREATOR.fromBundle(before.toBundle());
|
ExoPlaybackException after = ExoPlaybackException.CREATOR.fromBundle(before.toBundle());
|
||||||
assertThat(areEqual(before, after)).isTrue();
|
assertThat(areEqual(before, after)).isTrue();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void roundtripViaBundle_ofExoPlaybackExceptionTypeRenderer_yieldsEqualInstance() {
|
public void roundTripViaBundle_ofExoPlaybackExceptionTypeRenderer_yieldsEqualInstance() {
|
||||||
ExoPlaybackException before =
|
ExoPlaybackException before =
|
||||||
ExoPlaybackException.createForRenderer(
|
ExoPlaybackException.createForRenderer(
|
||||||
new IllegalStateException("ExoPlaybackExceptionTest"),
|
new IllegalStateException("ExoPlaybackExceptionTest"),
|
||||||
@ -51,7 +51,7 @@ public class ExoPlaybackExceptionTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void
|
public void
|
||||||
roundtripViaBundle_ofExoPlaybackExceptionTypeRendererWithPrivateCause_yieldsRemoteExceptionWithSameMessage() {
|
roundTripViaBundle_ofExoPlaybackExceptionTypeRendererWithPrivateCause_yieldsRemoteExceptionWithSameMessage() {
|
||||||
ExoPlaybackException before =
|
ExoPlaybackException before =
|
||||||
ExoPlaybackException.createForRenderer(
|
ExoPlaybackException.createForRenderer(
|
||||||
new Exception(/* message= */ "anonymous exception that class loader cannot know") {});
|
new Exception(/* message= */ "anonymous exception that class loader cannot know") {});
|
||||||
|
@ -395,7 +395,7 @@ public class MediaItemTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void roundtripViaBundle_withoutPlaybackProperties_yieldsEqualInstance() {
|
public void roundTripViaBundle_withoutPlaybackProperties_yieldsEqualInstance() {
|
||||||
MediaItem mediaItem =
|
MediaItem mediaItem =
|
||||||
new MediaItem.Builder()
|
new MediaItem.Builder()
|
||||||
.setMediaId("mediaId")
|
.setMediaId("mediaId")
|
||||||
@ -417,7 +417,7 @@ public class MediaItemTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void roundtripViaBundle_withPlaybackProperties_dropsPlaybackProperties() {
|
public void roundTripViaBundle_withPlaybackProperties_dropsPlaybackProperties() {
|
||||||
MediaItem mediaItem = new MediaItem.Builder().setUri(URI_STRING).build();
|
MediaItem mediaItem = new MediaItem.Builder().setUri(URI_STRING).build();
|
||||||
|
|
||||||
assertThat(mediaItem.playbackProperties).isNotNull();
|
assertThat(mediaItem.playbackProperties).isNotNull();
|
||||||
|
@ -44,7 +44,7 @@ public class MediaMetadataTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void roundtripViaBundle_yieldsEqualInstance() {
|
public void roundTripViaBundle_yieldsEqualInstance() {
|
||||||
MediaMetadata mediaMetadata = new MediaMetadata.Builder().setTitle("title").build();
|
MediaMetadata mediaMetadata = new MediaMetadata.Builder().setTitle("title").build();
|
||||||
|
|
||||||
assertThat(MediaMetadata.CREATOR.fromBundle(mediaMetadata.toBundle())).isEqualTo(mediaMetadata);
|
assertThat(MediaMetadata.CREATOR.fromBundle(mediaMetadata.toBundle())).isEqualTo(mediaMetadata);
|
||||||
|
@ -26,7 +26,7 @@ import org.junit.runner.RunWith;
|
|||||||
public class PlaybackParametersTest {
|
public class PlaybackParametersTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void roundtripViaBundle_ofPlaybackParameters_yieldsEqualInstance() {
|
public void roundTripViaBundle_ofPlaybackParameters_yieldsEqualInstance() {
|
||||||
PlaybackParameters playbackParameters =
|
PlaybackParameters playbackParameters =
|
||||||
new PlaybackParameters(/* speed= */ 2.9f, /* pitch= */ 1.2f);
|
new PlaybackParameters(/* speed= */ 2.9f, /* pitch= */ 1.2f);
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ import org.junit.runner.RunWith;
|
|||||||
public class PositionInfoTest {
|
public class PositionInfoTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void roundtripViaBundle_ofPositionInfoWithoutObjectFields_yieldsEqualInstance() {
|
public void roundTripViaBundle_ofPositionInfoWithoutObjectFields_yieldsEqualInstance() {
|
||||||
PositionInfo positionInfo =
|
PositionInfo positionInfo =
|
||||||
new PositionInfo(
|
new PositionInfo(
|
||||||
/* windowUid= */ null,
|
/* windowUid= */ null,
|
||||||
@ -43,7 +43,7 @@ public class PositionInfoTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void roundtripViaBundle_ofPositionInfoWithWindowUid_yieldsNullWindowUid() {
|
public void roundTripViaBundle_ofPositionInfoWithWindowUid_yieldsNullWindowUid() {
|
||||||
PositionInfo positionInfo =
|
PositionInfo positionInfo =
|
||||||
new PositionInfo(
|
new PositionInfo(
|
||||||
/* windowUid= */ new Object(),
|
/* windowUid= */ new Object(),
|
||||||
@ -60,7 +60,7 @@ public class PositionInfoTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void roundtripViaBundle_ofPositionInfoWithPeriodUid_yieldsNullPeriodUid() {
|
public void roundTripViaBundle_ofPositionInfoWithPeriodUid_yieldsNullPeriodUid() {
|
||||||
PositionInfo positionInfo =
|
PositionInfo positionInfo =
|
||||||
new PositionInfo(
|
new PositionInfo(
|
||||||
/* windowUid= */ null,
|
/* windowUid= */ null,
|
||||||
|
@ -209,7 +209,7 @@ public class TimelineTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void roundtripViaBundle_ofTimeline_yieldsEqualInstanceExceptIdsAndManifest() {
|
public void roundTripViaBundle_ofTimeline_yieldsEqualInstanceExceptIdsAndManifest() {
|
||||||
Timeline timeline =
|
Timeline timeline =
|
||||||
new FakeTimeline(
|
new FakeTimeline(
|
||||||
new TimelineWindowDefinition(
|
new TimelineWindowDefinition(
|
||||||
@ -244,7 +244,7 @@ public class TimelineTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void roundtripViaBundle_ofTimeline_preservesWindowIndices() {
|
public void roundTripViaBundle_ofTimeline_preservesWindowIndices() {
|
||||||
int windowCount = 10;
|
int windowCount = 10;
|
||||||
FakeTimeline timeline = new FakeTimeline(windowCount);
|
FakeTimeline timeline = new FakeTimeline(windowCount);
|
||||||
|
|
||||||
@ -285,12 +285,12 @@ public class TimelineTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void roundtripViaBundle_ofEmptyTimeline_returnsEmptyTimeline() {
|
public void roundTripViaBundle_ofEmptyTimeline_returnsEmptyTimeline() {
|
||||||
TimelineAsserts.assertEmpty(Timeline.CREATOR.fromBundle(Timeline.EMPTY.toBundle()));
|
TimelineAsserts.assertEmpty(Timeline.CREATOR.fromBundle(Timeline.EMPTY.toBundle()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void roundtripViaBundle_ofWindow_yieldsEqualInstanceExceptUidAndManifest() {
|
public void roundTripViaBundle_ofWindow_yieldsEqualInstanceExceptUidAndManifest() {
|
||||||
Timeline.Window window = new Timeline.Window();
|
Timeline.Window window = new Timeline.Window();
|
||||||
window.uid = new Object();
|
window.uid = new Object();
|
||||||
window.mediaItem = new MediaItem.Builder().setMediaId("mediaId").build();
|
window.mediaItem = new MediaItem.Builder().setMediaId("mediaId").build();
|
||||||
@ -322,7 +322,7 @@ public class TimelineTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void roundtripViaBundle_ofPeriod_yieldsEqualInstanceExceptIds() {
|
public void roundTripViaBundle_ofPeriod_yieldsEqualInstanceExceptIds() {
|
||||||
Timeline.Period period = new Timeline.Period();
|
Timeline.Period period = new Timeline.Period();
|
||||||
period.id = new Object();
|
period.id = new Object();
|
||||||
period.uid = new Object();
|
period.uid = new Object();
|
||||||
|
@ -27,7 +27,7 @@ import org.junit.runner.RunWith;
|
|||||||
public class AudioAttributesTest {
|
public class AudioAttributesTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void roundtripViaBundle_yieldsEqualInstance() {
|
public void roundTripViaBundle_yieldsEqualInstance() {
|
||||||
AudioAttributes audioAttributes =
|
AudioAttributes audioAttributes =
|
||||||
new AudioAttributes.Builder()
|
new AudioAttributes.Builder()
|
||||||
.setContentType(C.CONTENT_TYPE_SONIFICATION)
|
.setContentType(C.CONTENT_TYPE_SONIFICATION)
|
||||||
|
@ -26,7 +26,7 @@ import org.junit.runner.RunWith;
|
|||||||
public class DeviceInfoTest {
|
public class DeviceInfoTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void roundtripViaBundle_yieldsEqualInstance() {
|
public void roundTripViaBundle_yieldsEqualInstance() {
|
||||||
DeviceInfo deviceInfo =
|
DeviceInfo deviceInfo =
|
||||||
new DeviceInfo(DeviceInfo.PLAYBACK_TYPE_REMOTE, /* minVolume= */ 1, /* maxVolume= */ 9);
|
new DeviceInfo(DeviceInfo.PLAYBACK_TYPE_REMOTE, /* minVolume= */ 1, /* maxVolume= */ 9);
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@ public class AdPlaybackStateTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void roundtripViaBundle_yieldsEqualFieldsExceptAdsId() {
|
public void roundTripViaBundle_yieldsEqualFieldsExceptAdsId() {
|
||||||
AdPlaybackState originalState =
|
AdPlaybackState originalState =
|
||||||
state
|
state
|
||||||
.withAdCount(/* adGroupIndex= */ 0, /* adCount= */ 1)
|
.withAdCount(/* adGroupIndex= */ 0, /* adCount= */ 1)
|
||||||
@ -176,7 +176,7 @@ public class AdPlaybackStateTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void roundtripViaBundle_ofAdGroup_yieldsEqualInstance() {
|
public void roundTripViaBundle_ofAdGroup_yieldsEqualInstance() {
|
||||||
AdPlaybackState.AdGroup adGroup =
|
AdPlaybackState.AdGroup adGroup =
|
||||||
new AdPlaybackState.AdGroup()
|
new AdPlaybackState.AdGroup()
|
||||||
.withAdCount(2)
|
.withAdCount(2)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user