Skip to content

Commit dbdba31

Browse files
committed
annotate tests with @RunWith(JUnit4.class)
1 parent 74d8487 commit dbdba31

File tree

59 files changed

+181
-9
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+181
-9
lines changed

google-http-client/src/test/java/com/google/api/client/http/AbstractHttpContentTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,15 @@
2222
import java.util.Arrays;
2323
import junit.framework.TestCase;
2424
import org.junit.Test;
25+
import org.junit.runner.RunWith;
26+
import org.junit.runners.JUnit4;
2527

2628
/**
2729
* Tests {@link AbstractHttpContent}.
2830
*
2931
* @author Yaniv Inbar
3032
*/
33+
@RunWith(JUnit4.class)
3134
public class AbstractHttpContentTest {
3235

3336
static class TestHttpContent extends AbstractHttpContent {

google-http-client/src/test/java/com/google/api/client/http/BasicAuthenticationTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,15 @@
2020
import com.google.api.client.testing.http.MockHttpTransport;
2121
import junit.framework.TestCase;
2222
import org.junit.Test;
23+
import org.junit.runner.RunWith;
24+
import org.junit.runners.JUnit4;
2325

2426
/**
2527
* Tests {@link BasicAuthentication}.
2628
*
2729
* @author Yaniv Inbar
2830
*/
31+
@RunWith(JUnit4.class)
2932
public class BasicAuthenticationTest {
3033

3134
static final String USERNAME = "Aladdin";

google-http-client/src/test/java/com/google/api/client/http/ByteArrayContentTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,15 @@
2424
import java.io.IOException;
2525
import junit.framework.TestCase;
2626
import org.junit.Test;
27+
import org.junit.runner.RunWith;
28+
import org.junit.runners.JUnit4;
2729

2830
/**
2931
* Tests {@link ByteArrayContent}.
3032
*
3133
* @author Yaniv Inbar
3234
*/
35+
@RunWith(JUnit4.class)
3336
public class ByteArrayContentTest {
3437
private static final byte[] FOO = StringUtils.getBytesUtf8("foo");
3538

google-http-client/src/test/java/com/google/api/client/http/ConsumingInputStreamTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@
2222
import java.io.InputStream;
2323
import java.nio.charset.StandardCharsets;
2424
import org.junit.Test;
25+
import org.junit.runner.RunWith;
26+
import org.junit.runners.JUnit4;
2527

28+
@RunWith(JUnit4.class)
2629
public class ConsumingInputStreamTest {
2730

2831
@Test

google-http-client/src/test/java/com/google/api/client/http/EmptyContentTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,15 @@
2222
import java.io.IOException;
2323
import junit.framework.TestCase;
2424
import org.junit.Test;
25+
import org.junit.runner.RunWith;
26+
import org.junit.runners.JUnit4;
2527

2628
/**
2729
* Tests {@link EmptyContent}.
2830
*
2931
* @author Yaniv Inbar
3032
*/
33+
@RunWith(JUnit4.class)
3134
public class EmptyContentTest {
3235

3336
@Test

google-http-client/src/test/java/com/google/api/client/http/ExponentialBackOffPolicyTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,16 @@
2020
import com.google.api.client.util.NanoClock;
2121
import junit.framework.TestCase;
2222
import org.junit.Test;
23+
import org.junit.runner.RunWith;
24+
import org.junit.runners.JUnit4;
2325

2426
/**
2527
* Tests {@link ExponentialBackOffPolicy}.
2628
*
2729
* @author Ravi Mistry
2830
*/
2931
@Deprecated
32+
@RunWith(JUnit4.class)
3033
public class ExponentialBackOffPolicyTest {
3134

3235
@Test

google-http-client/src/test/java/com/google/api/client/http/GZipEncodingTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,15 @@
2323
import junit.framework.TestCase;
2424
import org.junit.Assert;
2525
import org.junit.Test;
26+
import org.junit.runner.RunWith;
27+
import org.junit.runners.JUnit4;
2628

2729
/**
2830
* Tests {@link GZipEncoding}.
2931
*
3032
* @author Yaniv Inbar
3133
*/
34+
@RunWith(JUnit4.class)
3235
public class GZipEncodingTest {
3336

3437
private static final byte[] EXPECED_ZIPPED =

google-http-client/src/test/java/com/google/api/client/http/GenericUrlTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,15 @@
3232
import junit.framework.TestCase;
3333
import org.junit.Assert;
3434
import org.junit.Test;
35+
import org.junit.runner.RunWith;
36+
import org.junit.runners.JUnit4;
3537

3638
/**
3739
* Tests {@link GenericUrl}.
3840
*
3941
* @author Yaniv Inbar
4042
*/
43+
@RunWith(JUnit4.class)
4144
public class GenericUrlTest {
4245

4346
private static final String MINIMAL = "http://bar";

google-http-client/src/test/java/com/google/api/client/http/GzipSupportTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@
2727
import java.io.SequenceInputStream;
2828
import java.util.zip.GZIPInputStream;
2929
import org.junit.Test;
30+
import org.junit.runner.RunWith;
31+
import org.junit.runners.JUnit4;
3032

33+
@RunWith(JUnit4.class)
3134
public final class GzipSupportTest {
3235

3336
@SuppressWarnings("UnstableApiUsage") // CountingInputStream is @Beta

google-http-client/src/test/java/com/google/api/client/http/HttpBackOffIOExpcetionHandlerTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,16 @@
2323
import com.google.api.client.util.Sleeper;
2424
import java.io.IOException;
2525
import java.util.concurrent.atomic.AtomicBoolean;
26-
import junit.framework.TestCase;
2726
import org.junit.Test;
27+
import org.junit.runner.RunWith;
28+
import org.junit.runners.JUnit4;
2829

2930
/**
3031
* Tests {@link HttpBackOffIOExceptionHandler}.
3132
*
3233
* @author Eyal Peled
3334
*/
35+
@RunWith(JUnit4.class)
3436
public class HttpBackOffIOExpcetionHandlerTest {
3537

3638
@Test

0 commit comments

Comments
 (0)