mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 08:57:12 +02:00
Re-add assertions that EppExceptions marshal correctly
These checks were removed in [] and re-adding them is the last step of the migration to using expectThrows/assertThrows globally. Note that this is roughly half of them. More to come in a follow-up CL. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=179216707
This commit is contained in:
parent
16a1d6d196
commit
da08baab92
17 changed files with 529 additions and 316 deletions
|
@ -17,8 +17,10 @@ package google.registry.flows.session;
|
|||
import static google.registry.testing.DatastoreHelper.deleteResource;
|
||||
import static google.registry.testing.DatastoreHelper.loadRegistrar;
|
||||
import static google.registry.testing.DatastoreHelper.persistResource;
|
||||
import static google.registry.testing.JUnitBackports.assertThrows;
|
||||
import static google.registry.testing.EppExceptionSubject.assertAboutEppExceptions;
|
||||
import static google.registry.testing.JUnitBackports.expectThrows;
|
||||
|
||||
import google.registry.flows.EppException;
|
||||
import google.registry.flows.EppException.UnimplementedExtensionException;
|
||||
import google.registry.flows.EppException.UnimplementedObjectServiceException;
|
||||
import google.registry.flows.EppException.UnimplementedProtocolVersionException;
|
||||
|
@ -61,9 +63,10 @@ public abstract class LoginFlowTestCase extends FlowTestCase<LoginFlow> {
|
|||
}
|
||||
|
||||
// Also called in subclasses.
|
||||
void doFailingTest(String xmlFilename, Class<? extends Exception> exception) throws Exception {
|
||||
void doFailingTest(String xmlFilename, Class<? extends EppException> exception) throws Exception {
|
||||
setEppInput(xmlFilename);
|
||||
assertThrows(exception, this::runFlow);
|
||||
EppException thrown = expectThrows(exception, this::runFlow);
|
||||
assertAboutEppExceptions().that(thrown).marshalsToXml();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue