summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/binding-rest-runtime
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-rest-runtime')
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/CustomerServiceTestCase.java9
-rw-r--r--sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/resources/customer.composite3
2 files changed, 11 insertions, 1 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/CustomerServiceTestCase.java b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/CustomerServiceTestCase.java
index ae9442214d..000f66c7b3 100644
--- a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/CustomerServiceTestCase.java
+++ b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/wireformat/xml/CustomerServiceTestCase.java
@@ -75,13 +75,22 @@ public class CustomerServiceTestCase {
WebConversation wc = new WebConversation();
WebRequest request = new GetMethodWebRequest(SERVICE_URL);
WebResponse response = wc.getResource(request);
+
+ //for debug purposes
+ //list the response headers
+ //for(String headerField : response.getHeaderFieldNames()) {
+ // System.out.println(">>> Header:" + headerField + " - " + response.getHeaderField(headerField));
+ //}
//for debug purposes
//System.out.println(">>>" + GET_RESPONSE);
//System.out.println(">>>" + response.getText());
Assert.assertEquals(200, response.getResponseCode());
+ Assert.assertEquals("no-cache", response.getHeaderField("Cache-Control"));
+ Assert.assertEquals("tuscany", response.getHeaderField("X-Tuscany"));
Assert.assertEquals(GET_RESPONSE, response.getText());
+
}
diff --git a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/resources/customer.composite b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/resources/customer.composite
index c100e264a7..7b33145afd 100644
--- a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/resources/customer.composite
+++ b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/resources/customer.composite
@@ -30,7 +30,8 @@
<tuscany:operationSelector.jaxrs />
<tuscany:http-headers>
<tuscany:header name="Cache-Control" value="no-cache"/>
- <tuscany:header name="Expires" value="-1"/>
+ <tuscany:header name="Expires" value="-1"/>
+ <tuscany:header name="X-Tuscany" value="tuscany"/>
</tuscany:http-headers>
</tuscany:binding.rest>
</service>