summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding
diff options
context:
space:
mode:
authorlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2010-04-30 20:44:31 +0000
committerlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2010-04-30 20:44:31 +0000
commit76828ad80690fc618afefbd6af566204871e3ec2 (patch)
tree19fc80098d88580fab1360cc8aec9329576f8208 /sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding
parentf8dee028695c57d27ddfc59936d073cfccaa1d4b (diff)
Minor update on REST cache control test case to accomodate refactoring to use common-http cache context class
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@939812 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding')
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/TestBindingCacheImpl.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/TestBindingCacheImpl.java b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/TestBindingCacheImpl.java
index 697f40ae69..8c943c1370 100644
--- a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/TestBindingCacheImpl.java
+++ b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/TestBindingCacheImpl.java
@@ -23,6 +23,8 @@ import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.util.Date;
+import org.apache.tuscany.sca.common.http.HTTPCacheContext;
+
/**
* Test service implementation that implements a various conditional HTTP
* methods. For testing, the id==0 items are very old (Date(0)), not modified,
@@ -49,7 +51,7 @@ public class TestBindingCacheImpl {
* @param id
* @return
*/
- public InputStream conditionalGet(String id, RESTCacheContext cacheContext)
+ public InputStream conditionalGet(String id, HTTPCacheContext cacheContext)
throws NotModifiedException, PreconditionFailedException {
if (cacheContext != null) {
@@ -99,7 +101,7 @@ public class TestBindingCacheImpl {
* @param id
* @return
*/
- public InputStream conditionalDelete(String id, RESTCacheContext cacheContext)
+ public InputStream conditionalDelete(String id, HTTPCacheContext cacheContext)
throws NotModifiedException, PreconditionFailedException {
if (cacheContext != null) {
@@ -151,7 +153,7 @@ public class TestBindingCacheImpl {
* @param id
* @return
*/
- public RESTCacheContext conditionalPost(RESTCacheContext cacheContext)
+ public HTTPCacheContext conditionalPost(HTTPCacheContext cacheContext)
throws NotModifiedException, PreconditionFailedException {
String id = "" + (new java.util.Random()).nextInt(Integer.MAX_VALUE);
@@ -180,7 +182,7 @@ public class TestBindingCacheImpl {
}
// Return the ETag and LastModfied fields by serialize to a byte array
- RESTCacheContext returnContext = new RESTCacheContext();
+ HTTPCacheContext returnContext = new HTTPCacheContext();
returnContext.setETag( "ETag" + (new java.util.Random()).nextInt(Integer.MAX_VALUE) );
returnContext.setLastModified( new Date() );
return returnContext;
@@ -202,7 +204,7 @@ public class TestBindingCacheImpl {
* @param id
* @return
*/
- public InputStream conditionalPut(String id, RESTCacheContext cacheContext)
+ public InputStream conditionalPut(String id, HTTPCacheContext cacheContext)
throws NotModifiedException, PreconditionFailedException {
if (cacheContext != null) {