mirror of
https://github.com/google/nomulus
synced 2026-09-19 22:44:26 +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:
@@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user