Commit ad46b909 by aquilescanta Committed by Oliver Woodman

Use Truth convenience methods for Exception-related assertions

PiperOrigin-RevId: 373180764
parent 2a2d6f66
......@@ -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());
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment