mirror of
https://github.com/google/nomulus.git
synced 2025-07-03 17:53:27 +02:00
Manually migrate some ExceptionRules to Junit 4.13 style asserts
These testing helper functions can't be handled by the automatic refactoring tool because they're taking in expected exception details as parameters. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=178832406
This commit is contained in:
parent
c2ed7429d3
commit
52ce49a02c
12 changed files with 60 additions and 56 deletions
|
@ -17,6 +17,7 @@ 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 google.registry.flows.EppException.UnimplementedExtensionException;
|
||||
import google.registry.flows.EppException.UnimplementedObjectServiceException;
|
||||
|
@ -60,11 +61,9 @@ 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 Exception> exception) throws Exception {
|
||||
setEppInput(xmlFilename);
|
||||
thrown.expect(exception);
|
||||
runFlow();
|
||||
assertThrows(exception, this::runFlow);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue