mirror of
https://github.com/google/nomulus.git
synced 2025-07-02 17:23:32 +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
|
@ -16,7 +16,6 @@ package google.registry.tmch;
|
|||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static google.registry.testing.JUnitBackports.assertThrows;
|
||||
import static google.registry.testing.JUnitBackports.expectThrows;
|
||||
import static google.registry.tmch.TmchTestData.loadSmd;
|
||||
|
||||
import google.registry.config.RegistryConfig.ConfigModule.TmchCaMode;
|
||||
|
@ -86,7 +85,7 @@ public class TmchXmlSignatureTest {
|
|||
tmchXmlSignature = new TmchXmlSignature(new TmchCertificateAuthority(TmchCaMode.PRODUCTION));
|
||||
smdData = loadSmd("active/Court-Agent-Arabic-Active.smd");
|
||||
CertificateSignatureException e =
|
||||
expectThrows(CertificateSignatureException.class, () -> tmchXmlSignature.verify(smdData));
|
||||
assertThrows(CertificateSignatureException.class, () -> tmchXmlSignature.verify(smdData));
|
||||
assertThat(e).hasMessageThat().contains("Signature does not match");
|
||||
}
|
||||
|
||||
|
@ -318,7 +317,7 @@ public class TmchXmlSignatureTest {
|
|||
public void testRevokedTmvTmvrevokedCourtAgentFrenchActive() throws Exception {
|
||||
smdData = loadSmd("revoked/tmv/TMVRevoked-Court-Agent-French-Active.smd");
|
||||
CertificateRevokedException e =
|
||||
expectThrows(CertificateRevokedException.class, () -> tmchXmlSignature.verify(smdData));
|
||||
assertThrows(CertificateRevokedException.class, () -> tmchXmlSignature.verify(smdData));
|
||||
assertThat(e).hasMessageThat().contains("KEY_COMPROMISE");
|
||||
}
|
||||
|
||||
|
@ -326,7 +325,7 @@ public class TmchXmlSignatureTest {
|
|||
public void testRevokedTmvTmvrevokedTrademarkAgentEnglishActive() throws Exception {
|
||||
smdData = loadSmd("revoked/tmv/TMVRevoked-Trademark-Agent-English-Active.smd");
|
||||
CertificateRevokedException e =
|
||||
expectThrows(CertificateRevokedException.class, () -> tmchXmlSignature.verify(smdData));
|
||||
assertThrows(CertificateRevokedException.class, () -> tmchXmlSignature.verify(smdData));
|
||||
assertThat(e).hasMessageThat().contains("KEY_COMPROMISE");
|
||||
}
|
||||
|
||||
|
@ -334,7 +333,7 @@ public class TmchXmlSignatureTest {
|
|||
public void testRevokedTmvTmvrevokedTrademarkAgentRussianActive() throws Exception {
|
||||
smdData = loadSmd("revoked/tmv/TMVRevoked-Trademark-Agent-Russian-Active.smd");
|
||||
CertificateRevokedException e =
|
||||
expectThrows(CertificateRevokedException.class, () -> tmchXmlSignature.verify(smdData));
|
||||
assertThrows(CertificateRevokedException.class, () -> tmchXmlSignature.verify(smdData));
|
||||
assertThat(e).hasMessageThat().contains("KEY_COMPROMISE");
|
||||
}
|
||||
|
||||
|
@ -342,7 +341,7 @@ public class TmchXmlSignatureTest {
|
|||
public void testRevokedTmvTmvrevokedTreatystatuteAgentChineseActive() throws Exception {
|
||||
smdData = loadSmd("revoked/tmv/TMVRevoked-TreatyStatute-Agent-Chinese-Active.smd");
|
||||
CertificateRevokedException e =
|
||||
expectThrows(CertificateRevokedException.class, () -> tmchXmlSignature.verify(smdData));
|
||||
assertThrows(CertificateRevokedException.class, () -> tmchXmlSignature.verify(smdData));
|
||||
assertThat(e).hasMessageThat().contains("KEY_COMPROMISE");
|
||||
}
|
||||
|
||||
|
@ -350,7 +349,7 @@ public class TmchXmlSignatureTest {
|
|||
public void testRevokedTmvTmvrevokedTreatystatuteAgentEnglishActive() throws Throwable {
|
||||
smdData = loadSmd("revoked/tmv/TMVRevoked-TreatyStatute-Agent-English-Active.smd");
|
||||
CertificateRevokedException e =
|
||||
expectThrows(CertificateRevokedException.class, () -> tmchXmlSignature.verify(smdData));
|
||||
assertThrows(CertificateRevokedException.class, () -> tmchXmlSignature.verify(smdData));
|
||||
assertThat(e).hasMessageThat().contains("KEY_COMPROMISE");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue