Author: chinthaka
Date: Sun Aug 20 23:37:50 2006
New Revision: 433174
URL: http://svn.apache.org/viewvc?rev=433174&view=rev
Log:
Removing more System.out by actually testing what needs to be tested.
Modified:
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11SerializerTest.java
Modified:
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11SerializerTest.java
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11SerializerTest.java?rev=433174&r1=433173&r2=433174&view=diff
==============================================================================
---
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11SerializerTest.java
(original)
+++
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/impl/llom/soap11/SOAP11SerializerTest.java
Sun Aug 20 23:37:50 2006
@@ -20,8 +20,8 @@
import org.apache.axiom.soap.SOAPEnvelope;
import org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder;
-import javax.xml.stream.XMLOutputFactory;
-import javax.xml.stream.XMLStreamWriter;
+import javax.xml.stream.XMLStreamException;
+
public class SOAP11SerializerTest extends OMTestCase {
public SOAP11SerializerTest(String testName) {
@@ -39,13 +39,16 @@
.getDocumentElement();
}
+ /**
+ * This will check whether we can call the serialize method two times, if
the first calls makes the object model.
+ * @throws Exception
+ */
public void testSerialize() throws Exception {
- XMLStreamWriter output = XMLOutputFactory.newInstance().
- createXMLStreamWriter(System.out);
- soapEnvelope.serialize(output);
-
- output = XMLOutputFactory.newInstance().
- createXMLStreamWriter(System.out);
- soapEnvelope.serializeAndConsume(output);
+ try {
+ soapEnvelope.toString();
+ soapEnvelope.toStringWithConsume();
+ } catch (XMLStreamException e) {
+ fail("This test should not fail as one must be able to serialize
twice if the object model is built in the first time");
+ }
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]