summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/implementation-jaxrs/src/test
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-12-11 08:53:51 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-12-11 08:53:51 +0000
commit33270526aac57fecec2bbbcb167cd895e1b9d39d (patch)
tree74ccde1e7510d228416ff2fe5b8664c4788b0bef /sca-java-2.x/trunk/modules/implementation-jaxrs/src/test
parenta4c5d8a7989ed5ec59daacf55d4c8fad6e23d3d7 (diff)
Fix testcase to close the writer
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1044590 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/implementation-jaxrs/src/test')
-rw-r--r--sca-java-2.x/trunk/modules/implementation-jaxrs/src/test/java/org/apache/tuscany/sca/implementation/jaxrs/xml/WriteTestCase.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/sca-java-2.x/trunk/modules/implementation-jaxrs/src/test/java/org/apache/tuscany/sca/implementation/jaxrs/xml/WriteTestCase.java b/sca-java-2.x/trunk/modules/implementation-jaxrs/src/test/java/org/apache/tuscany/sca/implementation/jaxrs/xml/WriteTestCase.java
index 7dcf70c711..4957f39c92 100644
--- a/sca-java-2.x/trunk/modules/implementation-jaxrs/src/test/java/org/apache/tuscany/sca/implementation/jaxrs/xml/WriteTestCase.java
+++ b/sca-java-2.x/trunk/modules/implementation-jaxrs/src/test/java/org/apache/tuscany/sca/implementation/jaxrs/xml/WriteTestCase.java
@@ -24,6 +24,7 @@ import java.io.InputStream;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamWriter;
import junit.framework.TestCase;
@@ -60,8 +61,9 @@ public class WriteTestCase extends TestCase {
Composite composite = (Composite) staxProcessor.read(inputFactory.createXMLStreamReader(is), context);
assertNotNull(composite);
ByteArrayOutputStream bos = new ByteArrayOutputStream();
- staxProcessor.write(composite, outputFactory.createXMLStreamWriter(bos), context);
-
+ XMLStreamWriter writer = outputFactory.createXMLStreamWriter(bos);
+ staxProcessor.write(composite, writer, context);
+ writer.close();
assertTrue(bos.toString().contains("application=\"test.MyJAXRSapp\""));
}