Boxing not usually important in test code; the EasyMock classes generate a lot of warnings

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1571382 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2014-02-24 18:24:25 +00:00
parent 9b5b7e9eb9
commit 7e162182b3
17 changed files with 19 additions and 0 deletions

View File

@ -47,6 +47,7 @@ import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
@SuppressWarnings("boxing") // test code
public class TestAsynchronousValidator { public class TestAsynchronousValidator {
private AsynchronousValidator impl; private AsynchronousValidator impl;

View File

@ -69,6 +69,7 @@ import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
@SuppressWarnings("boxing") // test code
public class TestCachingExec extends TestCachingExecChain { public class TestCachingExec extends TestCachingExecChain {
private static final String GET_CURRENT_DATE = "getCurrentDate"; private static final String GET_CURRENT_DATE = "getCurrentDate";

View File

@ -85,6 +85,7 @@ import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
@SuppressWarnings("boxing") // test code
public abstract class TestCachingExecChain { public abstract class TestCachingExecChain {
private ClientExecChain impl; private ClientExecChain impl;

View File

@ -43,6 +43,7 @@ import org.apache.http.impl.client.cache.HttpTestUtils;
import org.easymock.EasyMock; import org.easymock.EasyMock;
import org.junit.Test; import org.junit.Test;
@SuppressWarnings("boxing") // test code
public class TestEhcacheHttpCacheStorage extends TestCase { public class TestEhcacheHttpCacheStorage extends TestCase {
private Ehcache mockCache; private Ehcache mockCache;

View File

@ -35,6 +35,7 @@ import org.junit.Test;
/** /**
* @since 4.3 * @since 4.3
*/ */
@SuppressWarnings("boxing") // test code
public final class TestPropertiesUtils { public final class TestPropertiesUtils {
@Test @Test

View File

@ -36,6 +36,7 @@ import org.apache.http.impl.client.CloseableHttpClient;
import org.junit.Test; import org.junit.Test;
import org.mockito.Mockito; import org.mockito.Mockito;
@SuppressWarnings("boxing") // test code
public class TestHttpClientUtils { public class TestHttpClientUtils {
@Test @Test

View File

@ -34,6 +34,7 @@ import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mockito.Mockito; import org.mockito.Mockito;
@SuppressWarnings("boxing") // test code
public class TestEofSensorInputStream { public class TestEofSensorInputStream {
private InputStream instream; private InputStream instream;

View File

@ -40,6 +40,7 @@ import org.junit.Test;
/** /**
* Tests for {@link RouteTracker}. * Tests for {@link RouteTracker}.
*/ */
@SuppressWarnings("boxing") // test code
public class TestRouteTracker { public class TestRouteTracker {
// a selection of constants for generating routes // a selection of constants for generating routes

View File

@ -62,6 +62,7 @@ import org.mockito.Mockito;
/** /**
* Simple tests for {@link AuthenticationStrategyImpl}. * Simple tests for {@link AuthenticationStrategyImpl}.
*/ */
@SuppressWarnings("boxing") // test code
public class TestAuthenticationStrategy { public class TestAuthenticationStrategy {
@Test(expected=IllegalArgumentException.class) @Test(expected=IllegalArgumentException.class)

View File

@ -43,6 +43,7 @@ import org.mockito.Mockito;
/** /**
* Unit tests for {@link BasicResponseHandler}. * Unit tests for {@link BasicResponseHandler}.
*/ */
@SuppressWarnings("boxing") // test code
public class TestBasicResponseHandler { public class TestBasicResponseHandler {
@Test @Test

View File

@ -46,6 +46,7 @@ import org.mockito.Mockito;
/** /**
* Simple tests for {@link CloseableHttpClient}. * Simple tests for {@link CloseableHttpClient}.
*/ */
@SuppressWarnings("boxing") // test code
public class TestCloseableHttpClient { public class TestCloseableHttpClient {
static abstract class NoopCloseableHttpClient extends CloseableHttpClient { static abstract class NoopCloseableHttpClient extends CloseableHttpClient {

View File

@ -54,6 +54,7 @@ import org.mockito.Mock;
import org.mockito.Mockito; import org.mockito.Mockito;
import org.mockito.MockitoAnnotations; import org.mockito.MockitoAnnotations;
@SuppressWarnings("boxing") // test code
public class TestBasicHttpClientConnectionManager { public class TestBasicHttpClientConnectionManager {
@Mock @Mock

View File

@ -40,6 +40,7 @@ import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import junit.framework.Assert; import junit.framework.Assert;
import org.apache.http.ConnectionReuseStrategy; import org.apache.http.ConnectionReuseStrategy;
import org.apache.http.Header; import org.apache.http.Header;
import org.apache.http.HttpClientConnection; import org.apache.http.HttpClientConnection;
@ -90,6 +91,7 @@ import org.mockito.MockitoAnnotations;
import org.mockito.invocation.InvocationOnMock; import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer; import org.mockito.stubbing.Answer;
@SuppressWarnings("boxing") // test code
public class TestMainClientExec { public class TestMainClientExec {
@Mock @Mock

View File

@ -66,6 +66,7 @@ import java.lang.reflect.Proxy;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
@SuppressWarnings("boxing") // test code
public class TestMinimalClientExec { public class TestMinimalClientExec {
@Mock @Mock

View File

@ -27,6 +27,7 @@
package org.apache.http.impl.execchain; package org.apache.http.impl.execchain;
import junit.framework.Assert; import junit.framework.Assert;
import org.apache.http.Header; import org.apache.http.Header;
import org.apache.http.HttpEntity; import org.apache.http.HttpEntity;
import org.apache.http.HttpException; import org.apache.http.HttpException;
@ -64,6 +65,7 @@ import java.io.ByteArrayInputStream;
import java.io.InputStream; import java.io.InputStream;
import java.util.List; import java.util.List;
@SuppressWarnings("boxing") // test code
public class TestRedirectExec { public class TestRedirectExec {
@Mock @Mock

View File

@ -38,6 +38,7 @@ import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.mockito.Mockito; import org.mockito.Mockito;
@SuppressWarnings("boxing") // test code
public class TestResponseEntityWrapper { public class TestResponseEntityWrapper {
private InputStream instream; private InputStream instream;

View File

@ -42,6 +42,7 @@ import org.mockito.Mock;
import org.mockito.Mockito; import org.mockito.Mockito;
import org.mockito.MockitoAnnotations; import org.mockito.MockitoAnnotations;
@SuppressWarnings("boxing") // test code
public class TestServiceUnavailableRetryExec { public class TestServiceUnavailableRetryExec {
@Mock @Mock