From ad46b909188895eed18560e92cf217adf943df07 Mon Sep 17 00:00:00 2001 From: aquilescanta Date: Tue, 11 May 2021 18:23:55 +0100 Subject: [PATCH] Use Truth convenience methods for Exception-related assertions PiperOrigin-RevId: 373180764 --- .../com/google/android/exoplayer2/PlaybackExceptionTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/common/src/test/java/com/google/android/exoplayer2/PlaybackExceptionTest.java b/library/common/src/test/java/com/google/android/exoplayer2/PlaybackExceptionTest.java index c839c9b9ca..34ce6d1cc7 100644 --- a/library/common/src/test/java/com/google/android/exoplayer2/PlaybackExceptionTest.java +++ b/library/common/src/test/java/com/google/android/exoplayer2/PlaybackExceptionTest.java @@ -40,10 +40,10 @@ public class PlaybackExceptionTest { // TODO: Add test for backwards compatibility. private static void assertPlaybackExceptionsAreEqual(PlaybackException a, PlaybackException b) { - assertThat(a.getMessage()).isEqualTo(b.getMessage()); + assertThat(a).hasMessageThat().isEqualTo(b.getMessage()); assertThat(a.errorCode).isEqualTo(b.errorCode); assertThat(a.timestampMs).isEqualTo(b.timestampMs); assertThat(a.getCause().getClass()).isSameInstanceAs(b.getCause().getClass()); - assertThat(a.getCause().getMessage()).isEqualTo(b.getCause().getMessage()); + assertThat(a).hasCauseThat().hasMessageThat().isEqualTo(b.getCause().getMessage()); } }