From 7cc67a675e7e7d2c9d9337c7f6cf36cda9a85380 Mon Sep 17 00:00:00 2001 From: Andrew Phillips Date: Wed, 21 Dec 2011 21:14:03 -0500 Subject: [PATCH] [issue 461] Fixed compilation failures in tests. Same cause as e788f76411 --- .../jclouds/rest/binders/BindMapToStringPayloadTest.java | 6 ++++-- .../rest/internal/RestAnnotationProcessorTest.java | 9 ++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/core/src/test/java/org/jclouds/rest/binders/BindMapToStringPayloadTest.java b/core/src/test/java/org/jclouds/rest/binders/BindMapToStringPayloadTest.java index ae64498c48..c09803d9d2 100644 --- a/core/src/test/java/org/jclouds/rest/binders/BindMapToStringPayloadTest.java +++ b/core/src/test/java/org/jclouds/rest/binders/BindMapToStringPayloadTest.java @@ -54,7 +54,8 @@ public class BindMapToStringPayloadTest { @Test public void testCorrect() throws SecurityException, NoSuchMethodException { Method testPayload = TestPayload.class.getMethod("testPayload", String.class); - GeneratedHttpRequest request = GeneratedHttpRequest. builder() + // can't use GHR.builder() - see http://code.google.com/p/jclouds/issues/detail?id=461 + GeneratedHttpRequest request = new GeneratedHttpRequest.Builder() .declaring(TestPayload.class).javaMethod(testPayload).args(ImmutableList. of("robot")) .method(HttpMethod.POST).endpoint(URI.create("http://localhost")).build(); @@ -68,7 +69,8 @@ public class BindMapToStringPayloadTest { @Test(expectedExceptions = IllegalArgumentException.class) public void testMustHavePayloadAnnotation() throws SecurityException, NoSuchMethodException { Method noPayload = TestPayload.class.getMethod("noPayload", String.class); - GeneratedHttpRequest request = GeneratedHttpRequest. builder() + // can't use GHR.builder() - see http://code.google.com/p/jclouds/issues/detail?id=461 + GeneratedHttpRequest request = new GeneratedHttpRequest.Builder() .declaring(TestPayload.class).javaMethod(noPayload).args(ImmutableList. of("robot")) .method(HttpMethod.POST).endpoint(URI.create("http://localhost")).build(); binder().bindToRequest(request, ImmutableMap.of("fooble", "robot")); diff --git a/core/src/test/java/org/jclouds/rest/internal/RestAnnotationProcessorTest.java b/core/src/test/java/org/jclouds/rest/internal/RestAnnotationProcessorTest.java index 0728545c11..6acea0b7a6 100644 --- a/core/src/test/java/org/jclouds/rest/internal/RestAnnotationProcessorTest.java +++ b/core/src/test/java/org/jclouds/rest/internal/RestAnnotationProcessorTest.java @@ -1816,7 +1816,8 @@ public class RestAnnotationProcessorTest extends BaseRestClientTest { public void oneTransformerWithContext() throws SecurityException, NoSuchMethodException { RestAnnotationProcessor processor = factory(TestTransformers.class); Method method = TestTransformers.class.getMethod("oneTransformerWithContext"); - GeneratedHttpRequest request = GeneratedHttpRequest. builder().method("GET") + // can't use GHR.builder() - see http://code.google.com/p/jclouds/issues/detail?id=461 + GeneratedHttpRequest request = new GeneratedHttpRequest.Builder().method("GET") .endpoint(URI.create("http://localhost")).declaring(TestTransformers.class).javaMethod(method) .args(new Object[] {}).build(); Function transformer = processor.createResponseParser(method, request); @@ -2348,7 +2349,8 @@ public class RestAnnotationProcessorTest extends BaseRestClientTest { public void testCreateJAXBResponseParserWithAnnotation() throws SecurityException, NoSuchMethodException { RestAnnotationProcessor processor = factory(TestJAXBResponseParser.class); Method method = TestJAXBResponseParser.class.getMethod("jaxbGetWithAnnotation"); - GeneratedHttpRequest request = GeneratedHttpRequest. builder() + // can't use GHR.builder() - see http://code.google.com/p/jclouds/issues/detail?id=461 + GeneratedHttpRequest request = new GeneratedHttpRequest.Builder() .method("GET").endpoint(URI.create("http://localhost")).declaring(TestJAXBResponseParser.class) .javaMethod(method).args(new Object[] {}).build(); Function transformer = processor.createResponseParser(method, request); @@ -2359,7 +2361,8 @@ public class RestAnnotationProcessorTest extends BaseRestClientTest { public void testCreateJAXBResponseParserWithAcceptHeader() throws SecurityException, NoSuchMethodException { RestAnnotationProcessor processor = factory(TestJAXBResponseParser.class); Method method = TestJAXBResponseParser.class.getMethod("jaxbGetWithAcceptHeader"); - GeneratedHttpRequest request = GeneratedHttpRequest. builder() + // can't use GHR.builder() - see http://code.google.com/p/jclouds/issues/detail?id=461 + GeneratedHttpRequest request = new GeneratedHttpRequest.Builder() .method("GET").endpoint(URI.create("http://localhost")).declaring(TestJAXBResponseParser.class) .javaMethod(method).args(new Object[] {}).build(); Function transformer = processor.createResponseParser(method, request);