Remove unused ExpectedExceptions
Closes gh-10101
This commit is contained in:
committed by
Stephane Nicoll
parent
3ef3b40783
commit
118f65556f
@@ -17,9 +17,7 @@
|
||||
package org.springframework.boot.context.config;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.rules.ExpectedException;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent;
|
||||
@@ -40,9 +38,6 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*/
|
||||
public class DelegatingApplicationListenerTests {
|
||||
|
||||
@Rule
|
||||
public ExpectedException thrown = ExpectedException.none();
|
||||
|
||||
private final DelegatingApplicationListener listener = new DelegatingApplicationListener();
|
||||
|
||||
private final StaticApplicationContext context = new StaticApplicationContext();
|
||||
|
||||
@@ -18,9 +18,7 @@ package org.springframework.boot.context.properties.bind.convert;
|
||||
|
||||
import java.net.InetAddress;
|
||||
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.rules.ExpectedException;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@@ -31,9 +29,6 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*/
|
||||
public class InetAddressToStringConverterTests extends AbstractInetAddressTests {
|
||||
|
||||
@Rule
|
||||
public ExpectedException thrown = ExpectedException.none();
|
||||
|
||||
private InetAddressToStringConverter converter = new InetAddressToStringConverter();
|
||||
|
||||
@Test
|
||||
|
||||
@@ -19,9 +19,7 @@ package org.springframework.boot.context.properties.bind.handler;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.rules.ExpectedException;
|
||||
|
||||
import org.springframework.boot.context.properties.bind.BindException;
|
||||
import org.springframework.boot.context.properties.bind.BindHandler;
|
||||
@@ -42,9 +40,6 @@ import static org.assertj.core.api.Assertions.fail;
|
||||
*/
|
||||
public class NoUnboundElementsBindHandlerTests {
|
||||
|
||||
@Rule
|
||||
public ExpectedException thrown = ExpectedException.none();
|
||||
|
||||
private List<ConfigurationPropertySource> sources = new ArrayList<>();
|
||||
|
||||
private Binder binder;
|
||||
|
||||
@@ -20,9 +20,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.rules.ExpectedException;
|
||||
|
||||
import org.springframework.boot.context.properties.bind.Bindable;
|
||||
import org.springframework.boot.context.properties.bind.Binder;
|
||||
@@ -39,9 +37,6 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*/
|
||||
public class PackagePrivateBeanBindingTests {
|
||||
|
||||
@Rule
|
||||
public ExpectedException thrown = ExpectedException.none();
|
||||
|
||||
private List<ConfigurationPropertySource> sources = new ArrayList<>();
|
||||
|
||||
private Binder binder;
|
||||
|
||||
@@ -20,9 +20,7 @@ import java.util.Collections;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.rules.ExpectedException;
|
||||
|
||||
import org.springframework.core.env.ConfigurableEnvironment;
|
||||
import org.springframework.core.env.Environment;
|
||||
@@ -43,9 +41,6 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*/
|
||||
public class ConfigurationPropertySourcesTests {
|
||||
|
||||
@Rule
|
||||
public ExpectedException thrown = ExpectedException.none();
|
||||
|
||||
@Test
|
||||
public void attachShouldAddAdapterAtBeginning() throws Exception {
|
||||
ConfigurableEnvironment environment = new StandardEnvironment();
|
||||
|
||||
@@ -21,9 +21,7 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.rules.ExpectedException;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@@ -34,9 +32,6 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
*/
|
||||
public class MimeMappingsTests {
|
||||
|
||||
@Rule
|
||||
public ExpectedException thrown = ExpectedException.none();
|
||||
|
||||
@Test(expected = UnsupportedOperationException.class)
|
||||
public void defaultsCannotBeModified() throws Exception {
|
||||
MimeMappings.DEFAULT.add("foo", "foo/bar");
|
||||
|
||||
Reference in New Issue
Block a user