diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-12-11 08:54:23 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-12-11 08:54:23 +0000 |
commit | 7b7cac8c46748b7b4b28d09a6bbe1995b0392269 (patch) | |
tree | 3b6998c36fcf9f546f84d5f0a41a8566d6bb76b1 /sca-java-2.x/trunk/modules/implementation-web/src/test/java/org/apache/tuscany/sca/implementation/web/xml/WriteTestCase.java | |
parent | 33270526aac57fecec2bbbcb167cd895e1b9d39d (diff) |
Fix testcase to close the writer
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1044591 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r-- | sca-java-2.x/trunk/modules/implementation-web/src/test/java/org/apache/tuscany/sca/implementation/web/xml/WriteTestCase.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sca-java-2.x/trunk/modules/implementation-web/src/test/java/org/apache/tuscany/sca/implementation/web/xml/WriteTestCase.java b/sca-java-2.x/trunk/modules/implementation-web/src/test/java/org/apache/tuscany/sca/implementation/web/xml/WriteTestCase.java index ebad994033..57bfdbe822 100644 --- a/sca-java-2.x/trunk/modules/implementation-web/src/test/java/org/apache/tuscany/sca/implementation/web/xml/WriteTestCase.java +++ b/sca-java-2.x/trunk/modules/implementation-web/src/test/java/org/apache/tuscany/sca/implementation/web/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,7 +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("web-uri=\"MyWebapp\"")); |