diff --git a/javatests/google/registry/flows/domain/DomainCreateFlowTest.java b/javatests/google/registry/flows/domain/DomainCreateFlowTest.java index a9b0f5a8b..bc7b9c372 100644 --- a/javatests/google/registry/flows/domain/DomainCreateFlowTest.java +++ b/javatests/google/registry/flows/domain/DomainCreateFlowTest.java @@ -409,73 +409,73 @@ public class DomainCreateFlowTest extends ResourceFlowTestCaseof()); persistContactsAndHosts(); + thrown.expect(UnexpectedClaimsNoticeException.class); runFlow(); } @Test public void testFailure_claimsNoticeProvided_claimsPeriodEnded() throws Exception { - thrown.expect(ClaimsPeriodEndedException.class); setEppInput("domain_create_claim_notice.xml"); persistClaimsList(ImmutableMap.of("example-one", CLAIMS_KEY)); persistContactsAndHosts(); persistResource(Registry.get("tld").asBuilder() .setClaimsPeriodEnd(clock.nowUtc()) .build()); + thrown.expect(ClaimsPeriodEndedException.class); runFlow(); } @Test public void testFailure_tooManyNameservers() throws Exception { - thrown.expect(TooManyNameserversException.class); setEppInput("domain_create_14_nameservers.xml"); persistContactsAndHosts(); + thrown.expect(TooManyNameserversException.class); runFlow(); } @Test public void testFailure_secDnsMaxSigLife() throws Exception { - thrown.expect(MaxSigLifeNotSupportedException.class); setEppInput("domain_create_dsdata.xml"); persistContactsAndHosts(); + thrown.expect(MaxSigLifeNotSupportedException.class); runFlow(); } @Test public void testFailure_secDnsTooManyDsRecords() throws Exception { - thrown.expect(TooManyDsRecordsException.class); setEppInput("domain_create_dsdata_9_records.xml"); persistContactsAndHosts(); + thrown.expect(TooManyDsRecordsException.class); runFlow(); } @Test public void testFailure_wrongExtension() throws Exception { - thrown.expect(UnimplementedExtensionException.class); setEppInput("domain_create_wrong_extension.xml"); persistContactsAndHosts(); + thrown.expect(UnimplementedExtensionException.class); runFlow(); } @Test public void testFailure_wrongFeeAmount_v06() throws Exception { - thrown.expect(FeesMismatchException.class); setEppInput("domain_create_fee.xml", ImmutableMap.of("FEE_VERSION", "0.6")); - persistResource(Registry.get("tld").asBuilder().setCreateBillingCost(Money.of(USD, 20)).build()); + persistResource( + Registry.get("tld").asBuilder().setCreateBillingCost(Money.of(USD, 20)).build()); persistContactsAndHosts(); + thrown.expect(FeesMismatchException.class); runFlow(); } @Test public void testFailure_wrongFeeAmount_v11() throws Exception { - thrown.expect(FeesMismatchException.class); setEppInput("domain_create_fee.xml", ImmutableMap.of("FEE_VERSION", "0.11")); - persistResource(Registry.get("tld").asBuilder().setCreateBillingCost(Money.of(USD, 20)).build()); + persistResource( + Registry.get("tld").asBuilder().setCreateBillingCost(Money.of(USD, 20)).build()); persistContactsAndHosts(); + thrown.expect(FeesMismatchException.class); runFlow(); } @Test public void testFailure_wrongFeeAmount_v12() throws Exception { - thrown.expect(FeesMismatchException.class); setEppInput("domain_create_fee.xml", ImmutableMap.of("FEE_VERSION", "0.12")); - persistResource(Registry.get("tld").asBuilder().setCreateBillingCost(Money.of(USD, 20)).build()); + persistResource( + Registry.get("tld").asBuilder().setCreateBillingCost(Money.of(USD, 20)).build()); persistContactsAndHosts(); + thrown.expect(FeesMismatchException.class); runFlow(); } @Test public void testFailure_wrongCurrency_v06() throws Exception { - thrown.expect(CurrencyUnitMismatchException.class); setEppInput("domain_create_fee.xml", ImmutableMap.of("FEE_VERSION", "0.6")); persistResource(Registry.get("tld").asBuilder() .setCurrency(CurrencyUnit.EUR) @@ -726,12 +728,12 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase exception) throws Exception { - thrown.expect(exception); setEppInput("domain_create_uppercase.xml"); eppLoader.replaceAll("Example.tld", domainName); persistContactsAndHosts(); + thrown.expect(exception); runFlow(); } @@ -1341,10 +1344,10 @@ public class DomainCreateFlowTest extends ResourceFlowTestCaseof("irrelevant")) .build()); persistContactsAndHosts(); + thrown.expect(NotAuthorizedForTldException.class); runFlow(); } @@ -1486,12 +1489,12 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase { @Test public void testFailure_invalidPremiumList() throws Exception { thrown.expect(IllegalArgumentException.class); - runCommandForced( "--ip_whitelist=1.1.1.1", "--registrar=blobio", @@ -269,7 +268,6 @@ public class SetupOteCommandTest extends CommandTestCase { public void testFailure_tldExists() throws Exception { createTld("blobio-sunrise"); thrown.expect(IllegalStateException.class); - runCommandForced( "--ip_whitelist=1.1.1.1", "--registrar=blobio", @@ -284,7 +282,6 @@ public class SetupOteCommandTest extends CommandTestCase { .build(); persistResource(registrar); thrown.expect(IllegalStateException.class); - runCommandForced( "--ip_whitelist=1.1.1.1", "--registrar=blobio",