mirror of
https://github.com/google/nomulus.git
synced 2025-06-28 15:23:34 +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
|
@ -24,6 +24,7 @@ import static google.registry.testing.DatastoreHelper.persistDeletedDomain;
|
|||
import static google.registry.testing.DatastoreHelper.persistPremiumList;
|
||||
import static google.registry.testing.DatastoreHelper.persistReservedList;
|
||||
import static google.registry.testing.DatastoreHelper.persistResource;
|
||||
import static google.registry.testing.JUnitBackports.assertThrows;
|
||||
import static google.registry.util.DateTimeUtils.START_OF_TIME;
|
||||
import static org.joda.money.CurrencyUnit.USD;
|
||||
|
||||
|
@ -304,8 +305,7 @@ public class DomainCheckFlowTest
|
|||
private void doFailingBadLabelTest(String label, Class<? extends Exception> expectedException)
|
||||
throws Exception {
|
||||
setEppInput("domain_check_template.xml", ImmutableMap.of("LABEL", label));
|
||||
thrown.expect(expectedException);
|
||||
runFlow();
|
||||
assertThrows(expectedException, this::runFlow);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue