axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdani...@apache.org
Subject cvs commit: xml-axis/java/test/utils TestXMLUtils.java
Date Wed, 23 May 2001 18:20:19 GMT
gdaniels    01/05/23 11:20:19

  Modified:    java/test/utils TestXMLUtils.java
  Log:
  Test the right behavior for ElementToStream(), i.e. no XML declaration.
  
  Revision  Changes    Path
  1.4       +2 -10     xml-axis/java/test/utils/TestXMLUtils.java
  
  Index: TestXMLUtils.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/utils/TestXMLUtils.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestXMLUtils.java	2001/05/23 17:26:37	1.3
  +++ TestXMLUtils.java	2001/05/23 18:20:13	1.4
  @@ -77,10 +77,7 @@
       * This test method is somewhat complex, but it solves a problem people have
       * asked me about, which is how to unit test a method that has void return
       * type but writes its output to an output stream.  So half the reason for
  -    * creating and using it here is as a reference point.  <i>Note</i>, the
  -    * XMLUtils class does not omit the XML declaration when it does
  -    * ElementToStream, which is different behavior from its toString() method.
  -    * Might mention that to te developers.
  +    * creating and using it here is as a reference point.
       */
       public void testElementToStream() throws IOException
       {
  @@ -116,12 +113,7 @@
           //don't forget to close this end of the pipe (ConsumerPipe closes the other end).
           out.close();
           
  -        /* 
  -        * Unlike toString(), the XML declaration is not ommitted so we check to
  -        * make sure it's there.
  -        */
  -        assert(result.startsWith("<?xml version=")); 
  -        assert(result.endsWith(expected));
  +        assertEquals(expected, result);
       }
       
       /**
  
  
  

Mime
View raw message