From 8044e4cf3c78d9a45c7e556847932afdac18384d Mon Sep 17 00:00:00 2001 From: lresende Date: Mon, 10 May 2010 22:53:45 +0000 Subject: Updating test to check declarative header support git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@942940 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/binding/rest/wireformat/xml/CustomerServiceTestCase.java | 9 +++++++++ .../binding-rest-runtime/src/test/resources/customer.composite | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'sca-java-2.x/trunk/modules/binding-rest-runtime/src/test') 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 @@ - + + -- cgit v1.2.3