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

@ -30,7 +30,7 @@ public class IntervalParameterTest {
private final IntervalParameter instance = new IntervalParameter();
@Test
public void testConvert() throws Exception {
public void testConvert() {
assertThat(instance.convert("2004-06-09T12:30:00Z/2004-07-10T13:30:00Z"))
.isEqualTo(new Interval(
DateTime.parse("2004-06-09T12:30:00Z"),
@ -38,34 +38,34 @@ public class IntervalParameterTest {
}
@Test
public void testConvert_singleDate() throws Exception {
public void testConvert_singleDate() {
assertThrows(IllegalArgumentException.class, () -> instance.convert("2004-06-09T12:30:00Z"));
}
@Test
public void testConvert_backwardsInterval() throws Exception {
public void testConvert_backwardsInterval() {
assertThrows(
IllegalArgumentException.class,
() -> instance.convert("2004-07-10T13:30:00Z/2004-06-09T12:30:00Z"));
}
@Test
public void testConvert_empty_throws() throws Exception {
public void testConvert_empty_throws() {
assertThrows(IllegalArgumentException.class, () -> instance.convert(""));
}
@Test
public void testConvert_null_throws() throws Exception {
public void testConvert_null_throws() {
assertThrows(NullPointerException.class, () -> instance.convert(null));
}
@Test
public void testConvert_sillyString_throws() throws Exception {
public void testConvert_sillyString_throws() {
assertThrows(IllegalArgumentException.class, () -> instance.convert("foo"));
}
@Test
public void testValidate_sillyString_throws() throws Exception {
public void testValidate_sillyString_throws() {
ParameterException thrown =
assertThrows(ParameterException.class, () -> instance.validate("--time", "foo"));
assertThat(thrown).hasMessageThat().contains("--time=foo not an");