mirror of
https://github.com/google/nomulus.git
synced 2025-08-01 23:42:12 +02: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:
parent
5047d568de
commit
1751ea0b98
7 changed files with 18 additions and 16 deletions
|
@ -14,7 +14,6 @@
|
|||
|
||||
package google.registry.export;
|
||||
|
||||
import static com.google.common.base.Throwables.getRootCause;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth.assertWithMessage;
|
||||
import static google.registry.export.ExportReservedTermsAction.EXPORT_MIME_TYPE;
|
||||
|
@ -130,7 +129,7 @@ public class ExportReservedTermsActionTest {
|
|||
assertWithMessage("Expected RuntimeException to be thrown").fail();
|
||||
} catch (RuntimeException e) {
|
||||
verify(response).setStatus(SC_INTERNAL_SERVER_ERROR);
|
||||
assertThat(getRootCause(e)).hasMessage("errorMessage");
|
||||
assertThat(e).hasCauseThat().hasMessageThat().isEqualTo("errorMessage");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -141,7 +140,10 @@ public class ExportReservedTermsActionTest {
|
|||
assertWithMessage("Expected RuntimeException to be thrown").fail();
|
||||
} catch (RuntimeException e) {
|
||||
verify(response).setStatus(SC_INTERNAL_SERVER_ERROR);
|
||||
assertThat(getRootCause(e)).hasMessage("No registry object found for fakeTld");
|
||||
assertThat(e)
|
||||
.hasCauseThat()
|
||||
.hasMessageThat()
|
||||
.isEqualTo("No registry object found for fakeTld");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue