Merge pull request #14707 from dreis2211

* pr/14707:
  Remove unused fields in tests
This commit is contained in:
Stephane Nicoll 2018-10-08 10:40:16 +02:00
commit 8600489775
3 changed files with 0 additions and 21 deletions

View File

@ -24,12 +24,9 @@ import io.micrometer.core.instrument.Meter.Type;
import io.micrometer.core.instrument.config.MeterFilterReply;
import io.micrometer.core.instrument.distribution.DistributionStatisticConfig;
import io.micrometer.core.instrument.simple.SimpleMeterRegistry;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.springframework.boot.context.properties.bind.Bindable;
import org.springframework.boot.context.properties.bind.Binder;
@ -49,14 +46,6 @@ public class PropertiesMeterFilterTests {
@Rule
public ExpectedException thrown = ExpectedException.none();
@Mock
private DistributionStatisticConfig config;
@Before
public void setup() {
MockitoAnnotations.initMocks(this);
}
@Test
public void createWhenPropertiesIsNullShouldThrowException() {
this.thrown.expect(IllegalArgumentException.class);

View File

@ -24,8 +24,6 @@ import java.util.Map;
import org.junit.Before;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
import org.mockito.Captor;
import org.mockito.MockitoAnnotations;
import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.context.properties.bind.Bindable;
@ -33,7 +31,6 @@ import org.springframework.boot.context.properties.bind.Binder;
import org.springframework.boot.context.properties.source.ConfigurationPropertySource;
import org.springframework.boot.context.properties.source.MapConfigurationPropertySource;
import org.springframework.boot.web.server.Ssl;
import org.springframework.boot.web.servlet.ServletContextInitializer;
import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory;
import org.springframework.boot.web.servlet.server.Jsp;
import org.springframework.boot.web.servlet.server.Session;
@ -56,12 +53,8 @@ public class ServletWebServerFactoryCustomizerTests {
private ServletWebServerFactoryCustomizer customizer;
@Captor
private ArgumentCaptor<ServletContextInitializer[]> initializersCaptor;
@Before
public void setup() {
MockitoAnnotations.initMocks(this);
this.customizer = new ServletWebServerFactoryCustomizer(this.properties);
}

View File

@ -51,9 +51,6 @@ public class CommandRunnerTests {
@Mock
private Command regularCommand;
@Mock
private Command shellCommand;
@Mock
private Command anotherCommand;