diff options
author | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2010-05-10 22:53:45 +0000 |
---|---|---|
committer | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2010-05-10 22:53:45 +0000 |
commit | 8044e4cf3c78d9a45c7e556847932afdac18384d (patch) | |
tree | 9201699d4a3bc001971aab837cd9c6e5223f7561 /sca-java-2.x/trunk | |
parent | ea2451fbdf303d7c706deb1114d3781403802209 (diff) |
Updating test to check declarative header support
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@942940 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk')
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> |