mirror of
https://github.com/google/nomulus.git
synced 2025-06-09 14:04:45 +02:00
Merge JUnitBackport's expectThrows into assertThrows
More information: https://github.com/junit-team/junit5/issues/531 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=187034408
This commit is contained in:
parent
f96a0b7da9
commit
606b470cd0
180 changed files with 1325 additions and 1381 deletions
|
@ -18,7 +18,6 @@ import static com.google.common.base.Strings.repeat;
|
|||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static google.registry.keyring.api.PgpHelper.KeyRequirement.ENCRYPT;
|
||||
import static google.registry.testing.JUnitBackports.assertThrows;
|
||||
import static google.registry.testing.JUnitBackports.expectThrows;
|
||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
import static org.hamcrest.Matchers.greaterThan;
|
||||
import static org.hamcrest.Matchers.is;
|
||||
|
@ -193,7 +192,7 @@ public class GhostrydeTest {
|
|||
|
||||
ByteArrayInputStream bsIn = new ByteArrayInputStream(ciphertext);
|
||||
IllegalStateException thrown =
|
||||
expectThrows(
|
||||
assertThrows(
|
||||
IllegalStateException.class,
|
||||
() -> {
|
||||
try (Ghostryde.Decryptor decryptor = ghost.openDecryptor(bsIn, privateKey)) {
|
||||
|
@ -254,7 +253,7 @@ public class GhostrydeTest {
|
|||
|
||||
ByteArrayInputStream bsIn = new ByteArrayInputStream(bsOut.toByteArray());
|
||||
PGPException thrown =
|
||||
expectThrows(
|
||||
assertThrows(
|
||||
PGPException.class,
|
||||
() -> {
|
||||
try (Ghostryde.Decryptor decryptor = ghost.openDecryptor(bsIn, privateKey)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue