mirror of
https://github.com/google/nomulus.git
synced 2025-05-17 17:59:41 +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,7 @@ package google.registry.flows;
|
|||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static google.registry.testing.EppExceptionSubject.assertAboutEppExceptions;
|
||||
import static google.registry.testing.JUnitBackports.expectThrows;
|
||||
import static google.registry.testing.JUnitBackports.assertThrows;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
@ -63,7 +63,7 @@ public class ExtensionManagerTest {
|
|||
.build();
|
||||
manager.register(MetadataExtension.class, LaunchCreateExtension.class);
|
||||
EppException thrown =
|
||||
expectThrows(UnsupportedRepeatedExtensionException.class, manager::validate);
|
||||
assertThrows(UnsupportedRepeatedExtensionException.class, manager::validate);
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
|
@ -99,7 +99,7 @@ public class ExtensionManagerTest {
|
|||
.build();
|
||||
manager.register(FeeInfoCommandExtensionV06.class);
|
||||
EppException thrown =
|
||||
expectThrows(UndeclaredServiceExtensionException.class, manager::validate);
|
||||
assertThrows(UndeclaredServiceExtensionException.class, manager::validate);
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
|
@ -136,7 +136,7 @@ public class ExtensionManagerTest {
|
|||
.setSuppliedExtensions(MetadataExtension.class)
|
||||
.build();
|
||||
manager.register(MetadataExtension.class);
|
||||
EppException thrown = expectThrows(OnlyToolCanPassMetadataException.class, manager::validate);
|
||||
EppException thrown = assertThrows(OnlyToolCanPassMetadataException.class, manager::validate);
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
|
@ -164,7 +164,7 @@ public class ExtensionManagerTest {
|
|||
.build();
|
||||
manager.register(DomainTransferRequestSuperuserExtension.class);
|
||||
EppException thrown =
|
||||
expectThrows(UnauthorizedForSuperuserExtensionException.class, manager::validate);
|
||||
assertThrows(UnauthorizedForSuperuserExtensionException.class, manager::validate);
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
|
@ -179,7 +179,7 @@ public class ExtensionManagerTest {
|
|||
.build();
|
||||
manager.register(DomainTransferRequestSuperuserExtension.class);
|
||||
EppException thrown =
|
||||
expectThrows(UnauthorizedForSuperuserExtensionException.class, manager::validate);
|
||||
assertThrows(UnauthorizedForSuperuserExtensionException.class, manager::validate);
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
|
@ -191,7 +191,7 @@ public class ExtensionManagerTest {
|
|||
.setDeclaredUris()
|
||||
.setSuppliedExtensions(LaunchCreateExtension.class)
|
||||
.build();
|
||||
EppException thrown = expectThrows(UnimplementedExtensionException.class, manager::validate);
|
||||
EppException thrown = assertThrows(UnimplementedExtensionException.class, manager::validate);
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue