mirror of
https://github.com/google/nomulus
synced 2026-08-29 04:07:02 +00:00
Replace deprecated Truth hasMessage() method with hasMessageThat()
hasMessageThat() was added in Truth 0.32 and we are already on that version in the Nomulus release. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=153095111
This commit is contained in:
@@ -62,8 +62,8 @@ public class ConcurrentTest {
|
||||
fail("Didn't throw!");
|
||||
} catch (UncheckedExecutionException e) {
|
||||
// We can't use ExpectedException because root cause must be one level of indirection away.
|
||||
assertThat(e.getCause()).isInstanceOf(RuntimeException.class);
|
||||
assertThat(e.getCause()).hasMessage("hello");
|
||||
assertThat(e).hasCauseThat().isInstanceOf(RuntimeException.class);
|
||||
assertThat(e).hasCauseThat().hasMessageThat().isEqualTo("hello");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user