mirror of
https://github.com/google/nomulus.git
synced 2025-07-26 04:28:34 +02:00
Remove more unnecessary "throws" declarations
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=201243722
This commit is contained in:
parent
47322b7fcd
commit
ad73f3d167
61 changed files with 318 additions and 331 deletions
|
@ -1845,79 +1845,79 @@ public class DomainApplicationCreateFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_uppercase() throws Exception {
|
||||
public void testFailure_uppercase() {
|
||||
doFailingDomainNameTest("Example.tld", BadDomainNameCharacterException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_badCharacter() throws Exception {
|
||||
public void testFailure_badCharacter() {
|
||||
doFailingDomainNameTest("test_example.tld", BadDomainNameCharacterException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_leadingDash() throws Exception {
|
||||
public void testFailure_leadingDash() {
|
||||
doFailingDomainNameTest("-example.tld", LeadingDashException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_trailingDash() throws Exception {
|
||||
public void testFailure_trailingDash() {
|
||||
doFailingDomainNameTest("example-.tld", TrailingDashException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_tooLong() throws Exception {
|
||||
public void testFailure_tooLong() {
|
||||
doFailingDomainNameTest(Strings.repeat("a", 64) + ".tld", DomainLabelTooLongException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_leadingDot() throws Exception {
|
||||
public void testFailure_leadingDot() {
|
||||
doFailingDomainNameTest(".example.tld", EmptyDomainNamePartException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_leadingDotTld() throws Exception {
|
||||
public void testFailure_leadingDotTld() {
|
||||
doFailingDomainNameTest("foo..tld", EmptyDomainNamePartException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_tooManyParts() throws Exception {
|
||||
public void testFailure_tooManyParts() {
|
||||
doFailingDomainNameTest("foo.example.tld", BadDomainNamePartsCountException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_tooFewParts() throws Exception {
|
||||
public void testFailure_tooFewParts() {
|
||||
doFailingDomainNameTest("tld", BadDomainNamePartsCountException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_domainNameExistsAsTld_lowercase() throws Exception {
|
||||
public void testFailure_domainNameExistsAsTld_lowercase() {
|
||||
createTlds("foo.tld", "tld");
|
||||
doFailingDomainNameTest("foo.tld", DomainNameExistsAsTldException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_domainNameExistsAsTld_uppercase() throws Exception {
|
||||
public void testFailure_domainNameExistsAsTld_uppercase() {
|
||||
createTlds("foo.tld", "tld");
|
||||
doFailingDomainNameTest("FOO.TLD", BadDomainNameCharacterException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_invalidPunycode() throws Exception {
|
||||
public void testFailure_invalidPunycode() {
|
||||
doFailingDomainNameTest("xn--abcdefg.tld", InvalidPunycodeException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_dashesInThirdAndFourthPosition() throws Exception {
|
||||
public void testFailure_dashesInThirdAndFourthPosition() {
|
||||
doFailingDomainNameTest("ab--cdefg.tld", DashesInThirdAndFourthException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_tldDoesNotExist() throws Exception {
|
||||
public void testFailure_tldDoesNotExist() {
|
||||
doFailingDomainNameTest("foo.nosuchtld", TldDoesNotExistException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_invalidIdnCodePoints() throws Exception {
|
||||
public void testFailure_invalidIdnCodePoints() {
|
||||
// ❤☀☆☂☻♞☯.tld
|
||||
doFailingDomainNameTest("xn--k3hel9n7bxlu1e.tld", InvalidIdnDomainLabelException.class);
|
||||
}
|
||||
|
|
|
@ -111,7 +111,7 @@ public class DomainApplicationUpdateFlowTest
|
|||
unusedContact = persistActiveContact("unused");
|
||||
}
|
||||
|
||||
private DomainApplication persistApplication() throws Exception {
|
||||
private DomainApplication persistApplication() {
|
||||
return persistResource(
|
||||
newApplicationBuilder()
|
||||
.setContacts(
|
||||
|
@ -129,7 +129,7 @@ public class DomainApplicationUpdateFlowTest
|
|||
return newDomainApplication("example.tld").asBuilder().setRepoId("1-TLD");
|
||||
}
|
||||
|
||||
private DomainApplication persistNewApplication() throws Exception {
|
||||
private DomainApplication persistNewApplication() {
|
||||
return persistResource(newApplicationBuilder().build());
|
||||
}
|
||||
|
||||
|
@ -360,7 +360,7 @@ public class DomainApplicationUpdateFlowTest
|
|||
}
|
||||
|
||||
private void doSecDnsFailingTest(
|
||||
Class<? extends EppException> expectedException, String xmlFilename) throws Exception {
|
||||
Class<? extends EppException> expectedException, String xmlFilename) {
|
||||
setEppInput(xmlFilename);
|
||||
persistReferencedEntities();
|
||||
persistNewApplication();
|
||||
|
@ -369,30 +369,30 @@ public class DomainApplicationUpdateFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_secDnsAllCannotBeFalse() throws Exception {
|
||||
public void testFailure_secDnsAllCannotBeFalse() {
|
||||
doSecDnsFailingTest(
|
||||
SecDnsAllUsageException.class, "domain_update_sunrise_dsdata_rem_all_false.xml");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_secDnsEmptyNotAllowed() throws Exception {
|
||||
public void testFailure_secDnsEmptyNotAllowed() {
|
||||
doSecDnsFailingTest(EmptySecDnsUpdateException.class, "domain_update_sunrise_dsdata_empty.xml");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_secDnsUrgentNotSupported() throws Exception {
|
||||
public void testFailure_secDnsUrgentNotSupported() {
|
||||
doSecDnsFailingTest(
|
||||
UrgentAttributeNotSupportedException.class, "domain_update_sunrise_dsdata_urgent.xml");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_secDnsChangeNotSupported() throws Exception {
|
||||
public void testFailure_secDnsChangeNotSupported() {
|
||||
doSecDnsFailingTest(
|
||||
MaxSigLifeChangeNotSupportedException.class, "domain_update_sunrise_maxsiglife.xml");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_secDnsTooManyDsRecords() throws Exception {
|
||||
public void testFailure_secDnsTooManyDsRecords() {
|
||||
ImmutableSet.Builder<DelegationSignerData> builder = new ImmutableSet.Builder<>();
|
||||
for (int i = 0; i < 8; ++i) {
|
||||
builder.add(DelegationSignerData.create(i, 2, 3, new byte[] {0, 1, 2}));
|
||||
|
@ -437,7 +437,7 @@ public class DomainApplicationUpdateFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_applicationDomainNameMismatch() throws Exception {
|
||||
public void testFailure_applicationDomainNameMismatch() {
|
||||
persistReferencedEntities();
|
||||
persistResource(newApplicationBuilder().setFullyQualifiedDomainName("something.tld").build());
|
||||
EppException thrown = assertThrows(ApplicationDomainNameMismatchException.class, this::runFlow);
|
||||
|
@ -462,7 +462,7 @@ public class DomainApplicationUpdateFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_clientUpdateProhibited() throws Exception {
|
||||
public void testFailure_clientUpdateProhibited() {
|
||||
setEppInput("domain_update_sunrise_authinfo.xml");
|
||||
persistReferencedEntities();
|
||||
persistResource(
|
||||
|
@ -475,7 +475,7 @@ public class DomainApplicationUpdateFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_serverUpdateProhibited() throws Exception {
|
||||
public void testFailure_serverUpdateProhibited() {
|
||||
persistReferencedEntities();
|
||||
persistResource(
|
||||
newApplicationBuilder()
|
||||
|
@ -486,7 +486,7 @@ public class DomainApplicationUpdateFlowTest
|
|||
assertThat(thrown).hasMessageThat().contains("serverUpdateProhibited");
|
||||
}
|
||||
|
||||
private void doIllegalApplicationStatusTest(ApplicationStatus status) throws Exception {
|
||||
private void doIllegalApplicationStatusTest(ApplicationStatus status) {
|
||||
persistReferencedEntities();
|
||||
persistResource(newApplicationBuilder().setApplicationStatus(status).build());
|
||||
EppException thrown =
|
||||
|
@ -495,22 +495,22 @@ public class DomainApplicationUpdateFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_allocatedApplicationStatus() throws Exception {
|
||||
public void testFailure_allocatedApplicationStatus() {
|
||||
doIllegalApplicationStatusTest(ApplicationStatus.ALLOCATED);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_invalidApplicationStatus() throws Exception {
|
||||
public void testFailure_invalidApplicationStatus() {
|
||||
doIllegalApplicationStatusTest(ApplicationStatus.INVALID);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_rejectedApplicationStatus() throws Exception {
|
||||
public void testFailure_rejectedApplicationStatus() {
|
||||
doIllegalApplicationStatusTest(ApplicationStatus.REJECTED);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_missingHost() throws Exception {
|
||||
public void testFailure_missingHost() {
|
||||
persistActiveHost("ns1.example.tld");
|
||||
persistActiveContact("sh8013");
|
||||
persistActiveContact("mak21");
|
||||
|
@ -521,7 +521,7 @@ public class DomainApplicationUpdateFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_missingContact() throws Exception {
|
||||
public void testFailure_missingContact() {
|
||||
persistActiveHost("ns1.example.tld");
|
||||
persistActiveHost("ns2.example.tld");
|
||||
persistActiveContact("mak21");
|
||||
|
@ -553,7 +553,7 @@ public class DomainApplicationUpdateFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_clientProhibitedStatusValue() throws Exception {
|
||||
public void testFailure_clientProhibitedStatusValue() {
|
||||
setEppInput("domain_update_sunrise_prohibited_status.xml");
|
||||
persistReferencedEntities();
|
||||
persistNewApplication();
|
||||
|
@ -572,7 +572,7 @@ public class DomainApplicationUpdateFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_duplicateContactInCommand() throws Exception {
|
||||
public void testFailure_duplicateContactInCommand() {
|
||||
setEppInput("domain_update_sunrise_duplicate_contact.xml");
|
||||
persistReferencedEntities();
|
||||
persistNewApplication();
|
||||
|
@ -581,7 +581,7 @@ public class DomainApplicationUpdateFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_missingContactType() throws Exception {
|
||||
public void testFailure_missingContactType() {
|
||||
setEppInput("domain_update_sunrise_missing_contact_type.xml");
|
||||
persistReferencedEntities();
|
||||
persistNewApplication();
|
||||
|
@ -591,7 +591,7 @@ public class DomainApplicationUpdateFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_unauthorizedClient() throws Exception {
|
||||
public void testFailure_unauthorizedClient() {
|
||||
sessionMetadata.setClientId("NewRegistrar");
|
||||
persistReferencedEntities();
|
||||
persistApplication();
|
||||
|
@ -610,7 +610,7 @@ public class DomainApplicationUpdateFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_notAuthorizedForTld() throws Exception {
|
||||
public void testFailure_notAuthorizedForTld() {
|
||||
persistResource(
|
||||
loadRegistrar("TheRegistrar").asBuilder().setAllowedTlds(ImmutableSet.of()).build());
|
||||
persistReferencedEntities();
|
||||
|
@ -631,7 +631,7 @@ public class DomainApplicationUpdateFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_sameNameserverAddedAndRemoved() throws Exception {
|
||||
public void testFailure_sameNameserverAddedAndRemoved() {
|
||||
setEppInput("domain_update_sunrise_add_remove_same_host.xml");
|
||||
persistReferencedEntities();
|
||||
persistResource(
|
||||
|
@ -646,7 +646,7 @@ public class DomainApplicationUpdateFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_sameContactAddedAndRemoved() throws Exception {
|
||||
public void testFailure_sameContactAddedAndRemoved() {
|
||||
setEppInput("domain_update_sunrise_add_remove_same_contact.xml");
|
||||
persistReferencedEntities();
|
||||
persistResource(
|
||||
|
@ -663,7 +663,7 @@ public class DomainApplicationUpdateFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_removeAdmin() throws Exception {
|
||||
public void testFailure_removeAdmin() {
|
||||
setEppInput("domain_update_sunrise_remove_admin.xml");
|
||||
persistReferencedEntities();
|
||||
persistResource(
|
||||
|
@ -678,7 +678,7 @@ public class DomainApplicationUpdateFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_removeTech() throws Exception {
|
||||
public void testFailure_removeTech() {
|
||||
setEppInput("domain_update_sunrise_remove_tech.xml");
|
||||
persistReferencedEntities();
|
||||
persistResource(
|
||||
|
@ -693,7 +693,7 @@ public class DomainApplicationUpdateFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_newRegistrantNotWhitelisted() throws Exception {
|
||||
public void testFailure_newRegistrantNotWhitelisted() {
|
||||
persistReferencedEntities();
|
||||
persistApplication();
|
||||
persistResource(
|
||||
|
@ -707,7 +707,7 @@ public class DomainApplicationUpdateFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_newNameserverNotWhitelisted() throws Exception {
|
||||
public void testFailure_newNameserverNotWhitelisted() {
|
||||
persistReferencedEntities();
|
||||
persistApplication();
|
||||
persistResource(
|
||||
|
@ -734,7 +734,7 @@ public class DomainApplicationUpdateFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_tldWithNameserverWhitelist_removeLastNameserver() throws Exception {
|
||||
public void testFailure_tldWithNameserverWhitelist_removeLastNameserver() {
|
||||
setEppInput("domain_update_sunrise_remove_nameserver.xml");
|
||||
persistReferencedEntities();
|
||||
persistApplication();
|
||||
|
@ -790,7 +790,7 @@ public class DomainApplicationUpdateFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_domainNameserverRestricted_addedNameserverDisallowed() throws Exception {
|
||||
public void testFailure_domainNameserverRestricted_addedNameserverDisallowed() {
|
||||
persistReferencedEntities();
|
||||
persistApplication();
|
||||
persistResource(
|
||||
|
@ -807,7 +807,7 @@ public class DomainApplicationUpdateFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_domainNameserverRestricted_removeLastNameserver() throws Exception {
|
||||
public void testFailure_domainNameserverRestricted_removeLastNameserver() {
|
||||
setEppInput("domain_update_sunrise_remove_nameserver.xml");
|
||||
persistReferencedEntities();
|
||||
persistApplication();
|
||||
|
@ -868,8 +868,7 @@ public class DomainApplicationUpdateFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_addedNameserversAllowedInTld_disallowedInDomainNameserversWhitelists()
|
||||
throws Exception {
|
||||
public void testFailure_addedNameserversAllowedInTld_disallowedInDomainNameserversWhitelists() {
|
||||
persistReferencedEntities();
|
||||
persistApplication();
|
||||
persistResource(
|
||||
|
@ -888,8 +887,7 @@ public class DomainApplicationUpdateFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_addedNameserversDisallowedInTld_AllowedInDomainNameserversWhitelists()
|
||||
throws Exception {
|
||||
public void testFailure_addedNameserversDisallowedInTld_AllowedInDomainNameserversWhitelists() {
|
||||
persistReferencedEntities();
|
||||
persistApplication();
|
||||
persistResource(
|
||||
|
|
|
@ -92,7 +92,7 @@ public class DomainCheckFlowTest
|
|||
}
|
||||
|
||||
@Before
|
||||
public void initCheckTest() throws Exception {
|
||||
public void initCheckTest() {
|
||||
createTld("tld", TldState.QUIET_PERIOD);
|
||||
persistResource(Registry.get("tld").asBuilder().setReservedLists(createReservedList()).build());
|
||||
}
|
||||
|
@ -366,79 +366,79 @@ public class DomainCheckFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_uppercase() throws Exception {
|
||||
public void testFailure_uppercase() {
|
||||
doFailingBadLabelTest("FOO.tld", BadDomainNameCharacterException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_badCharacter() throws Exception {
|
||||
public void testFailure_badCharacter() {
|
||||
doFailingBadLabelTest("test_example.tld", BadDomainNameCharacterException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_leadingDash() throws Exception {
|
||||
public void testFailure_leadingDash() {
|
||||
doFailingBadLabelTest("-example.tld", LeadingDashException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_trailingDash() throws Exception {
|
||||
public void testFailure_trailingDash() {
|
||||
doFailingBadLabelTest("example-.tld", TrailingDashException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_tooLong() throws Exception {
|
||||
public void testFailure_tooLong() {
|
||||
doFailingBadLabelTest(Strings.repeat("a", 64) + ".tld", DomainLabelTooLongException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_leadingDot() throws Exception {
|
||||
public void testFailure_leadingDot() {
|
||||
doFailingBadLabelTest(".example.tld", EmptyDomainNamePartException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_leadingDotTld() throws Exception {
|
||||
public void testFailure_leadingDotTld() {
|
||||
doFailingBadLabelTest("foo..tld", EmptyDomainNamePartException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_tooManyParts() throws Exception {
|
||||
public void testFailure_tooManyParts() {
|
||||
doFailingBadLabelTest("foo.example.tld", BadDomainNamePartsCountException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_tooFewParts() throws Exception {
|
||||
public void testFailure_tooFewParts() {
|
||||
doFailingBadLabelTest("tld", BadDomainNamePartsCountException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_domainNameExistsAsTld_lowercase() throws Exception {
|
||||
public void testFailure_domainNameExistsAsTld_lowercase() {
|
||||
createTlds("foo.tld", "tld");
|
||||
doFailingBadLabelTest("foo.tld", DomainNameExistsAsTldException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_domainNameExistsAsTld_uppercase() throws Exception {
|
||||
public void testFailure_domainNameExistsAsTld_uppercase() {
|
||||
createTlds("foo.tld", "tld");
|
||||
doFailingBadLabelTest("FOO.TLD", BadDomainNameCharacterException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_invalidPunycode() throws Exception {
|
||||
public void testFailure_invalidPunycode() {
|
||||
doFailingBadLabelTest("xn--abcdefg.tld", InvalidPunycodeException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_dashesInThirdAndFourthPosition() throws Exception {
|
||||
public void testFailure_dashesInThirdAndFourthPosition() {
|
||||
doFailingBadLabelTest("ab--cdefg.tld", DashesInThirdAndFourthException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_tldDoesNotExist() throws Exception {
|
||||
public void testFailure_tldDoesNotExist() {
|
||||
doFailingBadLabelTest("foo.nosuchtld", TldDoesNotExistException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_invalidIdnCodePoints() throws Exception {
|
||||
public void testFailure_invalidIdnCodePoints() {
|
||||
// ❤☀☆☂☻♞☯.tld
|
||||
doFailingBadLabelTest("xn--k3hel9n7bxlu1e.tld", InvalidIdnDomainLabelException.class);
|
||||
}
|
||||
|
|
|
@ -883,7 +883,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_missingClaimsNotice() throws Exception {
|
||||
public void testFailure_missingClaimsNotice() {
|
||||
persistClaimsList(ImmutableMap.of("example", CLAIMS_KEY));
|
||||
setEppInput("domain_create.xml");
|
||||
persistContactsAndHosts();
|
||||
|
@ -1634,68 +1634,68 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_uppercase() throws Exception {
|
||||
public void testFailure_uppercase() {
|
||||
doFailingDomainNameTest("Example.tld", BadDomainNameCharacterException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_badCharacter() throws Exception {
|
||||
public void testFailure_badCharacter() {
|
||||
doFailingDomainNameTest("test_example.tld", BadDomainNameCharacterException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_leadingDash() throws Exception {
|
||||
public void testFailure_leadingDash() {
|
||||
doFailingDomainNameTest("-example.tld", LeadingDashException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_trailingDash() throws Exception {
|
||||
public void testFailure_trailingDash() {
|
||||
doFailingDomainNameTest("example-.tld", TrailingDashException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_tooLong() throws Exception {
|
||||
public void testFailure_tooLong() {
|
||||
doFailingDomainNameTest(Strings.repeat("a", 64) + ".tld", DomainLabelTooLongException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_leadingDot() throws Exception {
|
||||
public void testFailure_leadingDot() {
|
||||
doFailingDomainNameTest(".example.tld", EmptyDomainNamePartException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_leadingDotTld() throws Exception {
|
||||
public void testFailure_leadingDotTld() {
|
||||
doFailingDomainNameTest("foo..tld", EmptyDomainNamePartException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_tooManyParts() throws Exception {
|
||||
public void testFailure_tooManyParts() {
|
||||
doFailingDomainNameTest("foo.example.tld", BadDomainNamePartsCountException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_tooFewParts() throws Exception {
|
||||
public void testFailure_tooFewParts() {
|
||||
doFailingDomainNameTest("tld", BadDomainNamePartsCountException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_invalidPunycode() throws Exception {
|
||||
public void testFailure_invalidPunycode() {
|
||||
// You don't want to know what this string (might?) mean.
|
||||
doFailingDomainNameTest("xn--uxa129t5ap4f1h1bc3p.tld", InvalidPunycodeException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_dashesInThirdAndFourthPosition() throws Exception {
|
||||
public void testFailure_dashesInThirdAndFourthPosition() {
|
||||
doFailingDomainNameTest("ab--cdefg.tld", DashesInThirdAndFourthException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_tldDoesNotExist() throws Exception {
|
||||
public void testFailure_tldDoesNotExist() {
|
||||
doFailingDomainNameTest("foo.nosuchtld", TldDoesNotExistException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_invalidIdnCodePoints() throws Exception {
|
||||
public void testFailure_invalidIdnCodePoints() {
|
||||
// ❤☀☆☂☻♞☯.tld
|
||||
doFailingDomainNameTest("xn--k3hel9n7bxlu1e.tld", InvalidIdnDomainLabelException.class);
|
||||
}
|
||||
|
|
|
@ -195,8 +195,7 @@ public class DomainDeleteFlowTest extends ResourceFlowTestCase<DomainDeleteFlow,
|
|||
}
|
||||
|
||||
private void assertAutorenewClosedAndCancellationCreatedFor(
|
||||
BillingEvent.OneTime graceBillingEvent, HistoryEntry historyEntryDomainDelete)
|
||||
throws Exception {
|
||||
BillingEvent.OneTime graceBillingEvent, HistoryEntry historyEntryDomainDelete) {
|
||||
DateTime eventTime = clock.nowUtc();
|
||||
assertBillingEvents(
|
||||
createAutorenewBillingEvent("TheRegistrar").setRecurrenceEndTime(eventTime).build(),
|
||||
|
@ -212,7 +211,7 @@ public class DomainDeleteFlowTest extends ResourceFlowTestCase<DomainDeleteFlow,
|
|||
.build());
|
||||
}
|
||||
|
||||
private void assertOnlyBillingEventIsClosedAutorenew(String clientId) throws Exception {
|
||||
private void assertOnlyBillingEventIsClosedAutorenew(String clientId) {
|
||||
// There should be no billing events (even timed to when the transfer would have expired) except
|
||||
// for the now closed autorenew one.
|
||||
assertBillingEvents(
|
||||
|
|
|
@ -84,7 +84,7 @@ public class DomainTransferApproveFlowTest
|
|||
extends DomainTransferFlowTestCase<DomainTransferApproveFlow, DomainResource> {
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
public void setUp() {
|
||||
setEppInput("domain_transfer_approve.xml");
|
||||
// Change the registry so that the renew price changes a day minus 1 millisecond before the
|
||||
// transfer (right after there will be an autorenew in the test case that has one) and then
|
||||
|
|
|
@ -63,7 +63,7 @@ public class DomainTransferCancelFlowTest
|
|||
extends DomainTransferFlowTestCase<DomainTransferCancelFlow, DomainResource> {
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
public void setUp() {
|
||||
setEppInput("domain_transfer_cancel.xml");
|
||||
setClientIdForFlow("NewRegistrar");
|
||||
setupDomainWithPendingTransfer("example", "tld");
|
||||
|
|
|
@ -220,7 +220,7 @@ public class DomainTransferFlowTestCase<F extends Flow, R extends EppResource>
|
|||
}
|
||||
|
||||
/** Adds a domain that has a pending transfer on it from TheRegistrar to NewRegistrar. */
|
||||
protected void setupDomainWithPendingTransfer(String label, String tld) throws Exception {
|
||||
protected void setupDomainWithPendingTransfer(String label, String tld) {
|
||||
setupDomain(label, tld);
|
||||
domain = persistWithPendingTransfer(domain);
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ public class DomainTransferQueryFlowTest
|
|||
extends DomainTransferFlowTestCase<DomainTransferQueryFlow, DomainResource> {
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
public void setUp() {
|
||||
setEppInput("domain_transfer_query.xml");
|
||||
setClientIdForFlow("NewRegistrar");
|
||||
setupDomainWithPendingTransfer("example", "tld");
|
||||
|
|
|
@ -66,7 +66,7 @@ public class DomainTransferRejectFlowTest
|
|||
extends DomainTransferFlowTestCase<DomainTransferRejectFlow, DomainResource> {
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
public void setUp() {
|
||||
setEppInput("domain_transfer_reject.xml");
|
||||
setClientIdForFlow("TheRegistrar");
|
||||
setupDomainWithPendingTransfer("example", "tld");
|
||||
|
|
|
@ -209,8 +209,7 @@ public class DomainTransferRequestFlowTest
|
|||
Optional<Money> transferCost,
|
||||
ImmutableSet<GracePeriod> originalGracePeriods,
|
||||
boolean expectTransferBillingEvent,
|
||||
BillingEvent.Cancellation.Builder... extraExpectedBillingEvents)
|
||||
throws Exception {
|
||||
BillingEvent.Cancellation.Builder... extraExpectedBillingEvents) {
|
||||
Registry registry = Registry.get(domain.getTld());
|
||||
final HistoryEntry historyEntryTransferRequest =
|
||||
getOnlyHistoryEntryOfType(domain, DOMAIN_TRANSFER_REQUEST);
|
||||
|
@ -668,7 +667,7 @@ public class DomainTransferRequestFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_refundableFee_v06() throws Exception {
|
||||
public void testFailure_refundableFee_v06() {
|
||||
setupDomain("example", "tld");
|
||||
EppException thrown =
|
||||
assertThrows(
|
||||
|
@ -678,7 +677,7 @@ public class DomainTransferRequestFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_refundableFee_v11() throws Exception {
|
||||
public void testFailure_refundableFee_v11() {
|
||||
setupDomain("example", "tld");
|
||||
EppException thrown =
|
||||
assertThrows(
|
||||
|
@ -688,7 +687,7 @@ public class DomainTransferRequestFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_refundableFee_v12() throws Exception {
|
||||
public void testFailure_refundableFee_v12() {
|
||||
setupDomain("example", "tld");
|
||||
EppException thrown =
|
||||
assertThrows(
|
||||
|
@ -698,7 +697,7 @@ public class DomainTransferRequestFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_gracePeriodFee_v06() throws Exception {
|
||||
public void testFailure_gracePeriodFee_v06() {
|
||||
setupDomain("example", "tld");
|
||||
EppException thrown =
|
||||
assertThrows(
|
||||
|
@ -708,7 +707,7 @@ public class DomainTransferRequestFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_gracePeriodFee_v11() throws Exception {
|
||||
public void testFailure_gracePeriodFee_v11() {
|
||||
setupDomain("example", "tld");
|
||||
EppException thrown =
|
||||
assertThrows(
|
||||
|
@ -718,7 +717,7 @@ public class DomainTransferRequestFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_gracePeriodFee_v12() throws Exception {
|
||||
public void testFailure_gracePeriodFee_v12() {
|
||||
setupDomain("example", "tld");
|
||||
EppException thrown =
|
||||
assertThrows(
|
||||
|
@ -728,7 +727,7 @@ public class DomainTransferRequestFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_appliedFee_v06() throws Exception {
|
||||
public void testFailure_appliedFee_v06() {
|
||||
setupDomain("example", "tld");
|
||||
EppException thrown =
|
||||
assertThrows(
|
||||
|
@ -738,7 +737,7 @@ public class DomainTransferRequestFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_appliedFee_v11() throws Exception {
|
||||
public void testFailure_appliedFee_v11() {
|
||||
setupDomain("example", "tld");
|
||||
EppException thrown =
|
||||
assertThrows(
|
||||
|
@ -748,7 +747,7 @@ public class DomainTransferRequestFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_appliedFee_v12() throws Exception {
|
||||
public void testFailure_appliedFee_v12() {
|
||||
setupDomain("example", "tld");
|
||||
EppException thrown =
|
||||
assertThrows(
|
||||
|
@ -788,7 +787,7 @@ public class DomainTransferRequestFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_multiYearPeriod() throws Exception {
|
||||
public void testFailure_multiYearPeriod() {
|
||||
setupDomain("example", "tld");
|
||||
clock.advanceOneMilli();
|
||||
EppException thrown =
|
||||
|
@ -879,7 +878,7 @@ public class DomainTransferRequestFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_superuserExtension_twoYearPeriod() throws Exception {
|
||||
public void testFailure_superuserExtension_twoYearPeriod() {
|
||||
setupDomain("example", "tld");
|
||||
eppRequestSource = EppRequestSource.TOOL;
|
||||
clock.advanceOneMilli();
|
||||
|
@ -893,7 +892,7 @@ public class DomainTransferRequestFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_superuserExtension_zeroPeriod_feeTransferExtension() throws Exception {
|
||||
public void testFailure_superuserExtension_zeroPeriod_feeTransferExtension() {
|
||||
setupDomain("example", "tld");
|
||||
eppRequestSource = EppRequestSource.TOOL;
|
||||
clock.advanceOneMilli();
|
||||
|
@ -950,7 +949,7 @@ public class DomainTransferRequestFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_notAuthorizedForTld() throws Exception {
|
||||
public void testFailure_notAuthorizedForTld() {
|
||||
setupDomain("example", "tld");
|
||||
persistResource(
|
||||
loadRegistrar("NewRegistrar").asBuilder().setAllowedTlds(ImmutableSet.of()).build());
|
||||
|
@ -1091,7 +1090,7 @@ public class DomainTransferRequestFlowTest
|
|||
runTest("domain_transfer_request_premium.xml", UserPrivileges.SUPERUSER);
|
||||
}
|
||||
|
||||
private void runWrongCurrencyTest(Map<String, String> substitutions) throws Exception {
|
||||
private void runWrongCurrencyTest(Map<String, String> substitutions) {
|
||||
setupDomain("example", "tld");
|
||||
persistResource(
|
||||
Registry.get("tld")
|
||||
|
@ -1111,25 +1110,25 @@ public class DomainTransferRequestFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_wrongCurrency_v06() throws Exception {
|
||||
public void testFailure_wrongCurrency_v06() {
|
||||
setupDomain("example", "tld");
|
||||
runWrongCurrencyTest(FEE_06_MAP);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_wrongCurrency_v11() throws Exception {
|
||||
public void testFailure_wrongCurrency_v11() {
|
||||
setupDomain("example", "tld");
|
||||
runWrongCurrencyTest(FEE_11_MAP);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_wrongCurrency_v12() throws Exception {
|
||||
public void testFailure_wrongCurrency_v12() {
|
||||
setupDomain("example", "tld");
|
||||
runWrongCurrencyTest(FEE_12_MAP);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_feeGivenInWrongScale_v06() throws Exception {
|
||||
public void testFailure_feeGivenInWrongScale_v06() {
|
||||
setupDomain("example", "tld");
|
||||
EppException thrown =
|
||||
assertThrows(
|
||||
|
@ -1139,7 +1138,7 @@ public class DomainTransferRequestFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_feeGivenInWrongScale_v11() throws Exception {
|
||||
public void testFailure_feeGivenInWrongScale_v11() {
|
||||
setupDomain("example", "tld");
|
||||
EppException thrown =
|
||||
assertThrows(
|
||||
|
@ -1149,7 +1148,7 @@ public class DomainTransferRequestFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_feeGivenInWrongScale_v12() throws Exception {
|
||||
public void testFailure_feeGivenInWrongScale_v12() {
|
||||
setupDomain("example", "tld");
|
||||
EppException thrown =
|
||||
assertThrows(
|
||||
|
@ -1172,25 +1171,25 @@ public class DomainTransferRequestFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_wrongFeeAmount_v06() throws Exception {
|
||||
public void testFailure_wrongFeeAmount_v06() {
|
||||
setupDomain("example", "tld");
|
||||
runWrongFeeAmountTest(FEE_06_MAP);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_wrongFeeAmount_v11() throws Exception {
|
||||
public void testFailure_wrongFeeAmount_v11() {
|
||||
setupDomain("example", "tld");
|
||||
runWrongFeeAmountTest(FEE_11_MAP);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_wrongFeeAmount_v12() throws Exception {
|
||||
public void testFailure_wrongFeeAmount_v12() {
|
||||
setupDomain("example", "tld");
|
||||
runWrongFeeAmountTest(FEE_12_MAP);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_premiumBlocked() throws Exception {
|
||||
public void testFailure_premiumBlocked() {
|
||||
setupDomain("rich", "example");
|
||||
// Modify the Registrar to block premium names.
|
||||
persistResource(loadRegistrar("NewRegistrar").asBuilder().setBlockPremiumNames(true).build());
|
||||
|
@ -1202,7 +1201,7 @@ public class DomainTransferRequestFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_registryRequiresAcking_feeNotProvidedOnPremiumName() throws Exception {
|
||||
public void testFailure_registryRequiresAcking_feeNotProvidedOnPremiumName() {
|
||||
setupDomain("rich", "example");
|
||||
EppException thrown =
|
||||
assertThrows(
|
||||
|
@ -1212,7 +1211,7 @@ public class DomainTransferRequestFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_registrarRequiresAcking_feeNotProvidedOnPremiumName() throws Exception {
|
||||
public void testFailure_registrarRequiresAcking_feeNotProvidedOnPremiumName() {
|
||||
setupDomain("rich", "example");
|
||||
persistResource(Registry.get("example").asBuilder().setPremiumPriceAckRequired(false).build());
|
||||
persistResource(
|
||||
|
@ -1226,7 +1225,7 @@ public class DomainTransferRequestFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_noAuthInfo() throws Exception {
|
||||
public void testFailure_noAuthInfo() {
|
||||
setupDomain("example", "tld");
|
||||
EppException thrown =
|
||||
assertThrows(
|
||||
|
@ -1236,7 +1235,7 @@ public class DomainTransferRequestFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_badContactPassword() throws Exception {
|
||||
public void testFailure_badContactPassword() {
|
||||
setupDomain("example", "tld");
|
||||
// Change the contact's password so it does not match the password in the file.
|
||||
contact =
|
||||
|
@ -1253,7 +1252,7 @@ public class DomainTransferRequestFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_badContactRepoId() throws Exception {
|
||||
public void testFailure_badContactRepoId() {
|
||||
setupDomain("example", "tld");
|
||||
// Set the contact to a different ROID, but don't persist it; this is just so the substitution
|
||||
// code above will write the wrong ROID into the file.
|
||||
|
@ -1301,7 +1300,7 @@ public class DomainTransferRequestFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_pending() throws Exception {
|
||||
public void testFailure_pending() {
|
||||
setupDomain("example", "tld");
|
||||
domain =
|
||||
persistResource(
|
||||
|
@ -1323,7 +1322,7 @@ public class DomainTransferRequestFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_badDomainPassword() throws Exception {
|
||||
public void testFailure_badDomainPassword() {
|
||||
setupDomain("example", "tld");
|
||||
// Change the domain's password so it does not match the password in the file.
|
||||
domain =
|
||||
|
@ -1340,7 +1339,7 @@ public class DomainTransferRequestFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_sponsoringClient() throws Exception {
|
||||
public void testFailure_sponsoringClient() {
|
||||
setupDomain("example", "tld");
|
||||
setClientIdForFlow("TheRegistrar");
|
||||
EppException thrown =
|
||||
|
@ -1389,7 +1388,7 @@ public class DomainTransferRequestFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_periodInMonths() throws Exception {
|
||||
public void testFailure_periodInMonths() {
|
||||
setupDomain("example", "tld");
|
||||
EppException thrown =
|
||||
assertThrows(
|
||||
|
@ -1399,7 +1398,7 @@ public class DomainTransferRequestFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_clientTransferProhibited() throws Exception {
|
||||
public void testFailure_clientTransferProhibited() {
|
||||
setupDomain("example", "tld");
|
||||
domain =
|
||||
persistResource(
|
||||
|
@ -1412,7 +1411,7 @@ public class DomainTransferRequestFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_serverTransferProhibited() throws Exception {
|
||||
public void testFailure_serverTransferProhibited() {
|
||||
setupDomain("example", "tld");
|
||||
domain =
|
||||
persistResource(
|
||||
|
@ -1425,7 +1424,7 @@ public class DomainTransferRequestFlowTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_pendingDelete() throws Exception {
|
||||
public void testFailure_pendingDelete() {
|
||||
setupDomain("example", "tld");
|
||||
domain = persistResource(domain.asBuilder().addStatusValue(StatusValue.PENDING_DELETE).build());
|
||||
ResourceStatusProhibitsOperationException thrown =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue