mirror of
https://github.com/google/nomulus.git
synced 2025-07-21 10:16:07 +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
|
@ -87,50 +87,50 @@ public abstract class LoginFlowTestCase extends FlowTestCase<LoginFlow> {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_invalidVersion() throws Exception {
|
||||
public void testFailure_invalidVersion() {
|
||||
doFailingTest("login_invalid_version.xml", UnimplementedProtocolVersionException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_invalidLanguage() throws Exception {
|
||||
public void testFailure_invalidLanguage() {
|
||||
doFailingTest("login_invalid_language.xml", UnsupportedLanguageException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_invalidExtension() throws Exception {
|
||||
public void testFailure_invalidExtension() {
|
||||
doFailingTest("login_invalid_extension.xml", UnimplementedExtensionException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_invalidTypes() throws Exception {
|
||||
public void testFailure_invalidTypes() {
|
||||
doFailingTest("login_invalid_types.xml", UnimplementedObjectServiceException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_newPassword() throws Exception {
|
||||
public void testFailure_newPassword() {
|
||||
doFailingTest("login_invalid_newpw.xml", PasswordChangesNotSupportedException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_unknownRegistrar() throws Exception {
|
||||
public void testFailure_unknownRegistrar() {
|
||||
deleteResource(getRegistrarBuilder().build());
|
||||
doFailingTest("login_valid.xml", BadRegistrarClientIdException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_pendingRegistrar() throws Exception {
|
||||
public void testFailure_pendingRegistrar() {
|
||||
persistResource(getRegistrarBuilder().setState(State.PENDING).build());
|
||||
doFailingTest("login_valid.xml", RegistrarAccountNotActiveException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_incorrectPassword() throws Exception {
|
||||
public void testFailure_incorrectPassword() {
|
||||
persistResource(getRegistrarBuilder().setPassword("diff password").build());
|
||||
doFailingTest("login_valid.xml", BadRegistrarPasswordException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_tooManyFailedLogins() throws Exception {
|
||||
public void testFailure_tooManyFailedLogins() {
|
||||
persistResource(getRegistrarBuilder().setPassword("diff password").build());
|
||||
doFailingTest("login_valid.xml", BadRegistrarPasswordException.class);
|
||||
doFailingTest("login_valid.xml", BadRegistrarPasswordException.class);
|
||||
|
@ -139,7 +139,7 @@ public abstract class LoginFlowTestCase extends FlowTestCase<LoginFlow> {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_alreadyLoggedIn() throws Exception {
|
||||
public void testFailure_alreadyLoggedIn() {
|
||||
sessionMetadata.setClientId("something");
|
||||
doFailingTest("login_valid.xml", AlreadyLoggedInException.class);
|
||||
}
|
||||
|
|
|
@ -44,27 +44,27 @@ public class LoginFlowViaConsoleTest extends LoginFlowTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_withoutLoginAndLinkedAccount() throws Exception {
|
||||
public void testFailure_withoutLoginAndLinkedAccount() {
|
||||
persistLinkedAccount("person@example.com", GAE_USER_ID1);
|
||||
credentials = GaeUserCredentials.forLoggedOutUser();
|
||||
doFailingTest("login_valid.xml", UserNotLoggedInException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_withoutLoginAndWithoutLinkedAccount() throws Exception {
|
||||
public void testFailure_withoutLoginAndWithoutLinkedAccount() {
|
||||
credentials = GaeUserCredentials.forLoggedOutUser();
|
||||
doFailingTest("login_valid.xml", UserNotLoggedInException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_withLoginAndWithoutLinkedAccount() throws Exception {
|
||||
public void testFailure_withLoginAndWithoutLinkedAccount() {
|
||||
credentials =
|
||||
GaeUserCredentials.forTestingUser(new User("person", "example.com", GAE_USER_ID1), false);
|
||||
doFailingTest("login_valid.xml", BadGaeUserIdException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_withLoginAndNoMatchingLinkedAccount() throws Exception {
|
||||
public void testFailure_withLoginAndNoMatchingLinkedAccount() {
|
||||
persistLinkedAccount("joe@example.com", GAE_USER_ID2);
|
||||
credentials =
|
||||
GaeUserCredentials.forTestingUser(new User("person", "example.com", GAE_USER_ID1), false);
|
||||
|
|
|
@ -88,28 +88,28 @@ public class LoginFlowViaTlsTest extends LoginFlowTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_incorrectClientCertificateHash() throws Exception {
|
||||
public void testFailure_incorrectClientCertificateHash() {
|
||||
persistResource(getRegistrarBuilder().build());
|
||||
credentials = new TlsCredentials(BAD_CERT, GOOD_IP, "goo.example");
|
||||
doFailingTest("login_valid.xml", BadRegistrarCertificateException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_missingClientCertificateHash() throws Exception {
|
||||
public void testFailure_missingClientCertificateHash() {
|
||||
persistResource(getRegistrarBuilder().build());
|
||||
credentials = new TlsCredentials(null, GOOD_IP, "goo.example");
|
||||
doFailingTest("login_valid.xml", MissingRegistrarCertificateException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_noSniAndCertRequired() throws Exception {
|
||||
public void testFailure_noSniAndCertRequired() {
|
||||
persistResource(getRegistrarBuilder().build());
|
||||
credentials = new TlsCredentials(null, GOOD_IP, null);
|
||||
doFailingTest("login_valid.xml", NoSniException.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_missingClientIpAddress() throws Exception {
|
||||
public void testFailure_missingClientIpAddress() {
|
||||
persistResource(
|
||||
getRegistrarBuilder()
|
||||
.setIpAddressWhitelist(ImmutableList.of(
|
||||
|
@ -121,7 +121,7 @@ public class LoginFlowViaTlsTest extends LoginFlowTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_incorrectClientIpv4Address() throws Exception {
|
||||
public void testFailure_incorrectClientIpv4Address() {
|
||||
persistResource(
|
||||
getRegistrarBuilder()
|
||||
.setIpAddressWhitelist(ImmutableList.of(
|
||||
|
@ -133,7 +133,7 @@ public class LoginFlowViaTlsTest extends LoginFlowTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFailure_incorrectClientIpv6Address() throws Exception {
|
||||
public void testFailure_incorrectClientIpv6Address() {
|
||||
persistResource(
|
||||
getRegistrarBuilder()
|
||||
.setIpAddressWhitelist(ImmutableList.of(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue