Remove unnecessary "throws" declarations

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=201058582
This commit is contained in:
mcilwain 2018-06-18 14:25:42 -07:00 committed by Ben McIlwain
parent a7256f5edd
commit 5d80f124ca
377 changed files with 2297 additions and 2373 deletions

View file

@ -54,42 +54,41 @@ public class HostFlowUtilsTest {
}
@Test
public void test_validExternalHostNameOnRegistrySuffixList_multipartTLD_tooShallow()
throws Exception {
public void test_validExternalHostNameOnRegistrySuffixList_multipartTLD_tooShallow() {
assertThrows(
HostNameTooShallowException.class, () -> validateHostName("host.co.uk").toString());
}
@Test
public void test_validateHostName_hostNameTooLong() throws Exception {
public void test_validateHostName_hostNameTooLong() {
assertThrows(
HostNameTooLongException.class,
() -> validateHostName(Strings.repeat("na", 200) + ".wat.man"));
}
@Test
public void test_validateHostName_hostNameNotLowerCase() throws Exception {
public void test_validateHostName_hostNameNotLowerCase() {
assertThrows(HostNameNotLowerCaseException.class, () -> validateHostName("NA.CAPS.TLD"));
}
@Test
public void test_validateHostName_hostNameNotPunyCoded() throws Exception {
public void test_validateHostName_hostNameNotPunyCoded() {
assertThrows(
HostNameNotPunyCodedException.class, () -> validateHostName("motörhead.death.metal"));
}
@Test
public void test_validateHostName_hostNameNotNormalized() throws Exception {
public void test_validateHostName_hostNameNotNormalized() {
assertThrows(HostNameNotNormalizedException.class, () -> validateHostName("root.node.yeah."));
}
@Test
public void test_validateHostName_hostNameHasLeadingHyphen() throws Exception {
public void test_validateHostName_hostNameHasLeadingHyphen() {
assertThrows(InvalidHostNameException.class, () -> validateHostName("-giga.mega.tld"));
}
@Test
public void test_validateHostName_hostNameTooShallow() throws Exception {
public void test_validateHostName_hostNameTooShallow() {
assertThrows(HostNameTooShallowException.class, () -> validateHostName("domain.tld"));
}
}