Skip to content

Commit cebac15

Browse files
format
1 parent b68464d commit cebac15

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed

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

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,26 @@
1414

1515
package com.google.api.client.http;
1616

17-
import java.io.IOException;
18-
1917
import com.google.api.client.http.javanet.NetHttpTransport;
20-
18+
import java.io.IOException;
2119
import junit.framework.TestCase;
2220

23-
/**
24-
* Tests {@link HttpRequestFactory}.
25-
*/
21+
/** Tests {@link HttpRequestFactory}. */
2622
public class HttpRequestFactoryTest extends TestCase {
2723

2824
public void testBuildRequest_urlShouldBeSet() throws IllegalArgumentException, IOException {
2925
HttpRequestFactory requestFactory =
30-
new NetHttpTransport().createRequestFactory(
31-
new HttpRequestInitializer() {
32-
@Override
33-
public void initialize(HttpRequest request) {
34-
// Url should be set by buildRequest method before calling initialize.
35-
if (request.getUrl() == null) {
36-
throw new IllegalArgumentException("url is not set in request");
37-
}
38-
}
39-
});
26+
new NetHttpTransport()
27+
.createRequestFactory(
28+
new HttpRequestInitializer() {
29+
@Override
30+
public void initialize(HttpRequest request) {
31+
// Url should be set by buildRequest method before calling initialize.
32+
if (request.getUrl() == null) {
33+
throw new IllegalArgumentException("url is not set in request");
34+
}
35+
}
36+
});
4037
GenericUrl url = new GenericUrl("https://foo.googleapis.com/");
4138
HttpRequest request = requestFactory.buildRequest("GET", url, null);
4239
assertEquals(url, request.getUrl());

0 commit comments

Comments
 (0)