commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject svn commit: r225872 - in /jakarta/commons/proper/betwixt/trunk/src/test/org/apache/commons/betwixt: TestCollectionMapping.java TestMultiMapping.java TestReferenceMapping.java io/TestBeanWriter.java strategy/TestMixedContentEncoding.java
Date Thu, 28 Jul 2005 20:18:01 GMT
Author: rdonkin
Date: Thu Jul 28 13:17:55 2005
New Revision: 225872

URL: http://svn.apache.org/viewcvs?rev=225872&view=rev
Log:
Fixes to test failures on windoz caused by change of EOL default. Contributed by John M. Issue
35723.

Modified:
    jakarta/commons/proper/betwixt/trunk/src/test/org/apache/commons/betwixt/TestCollectionMapping.java
    jakarta/commons/proper/betwixt/trunk/src/test/org/apache/commons/betwixt/TestMultiMapping.java
    jakarta/commons/proper/betwixt/trunk/src/test/org/apache/commons/betwixt/TestReferenceMapping.java
    jakarta/commons/proper/betwixt/trunk/src/test/org/apache/commons/betwixt/io/TestBeanWriter.java
    jakarta/commons/proper/betwixt/trunk/src/test/org/apache/commons/betwixt/strategy/TestMixedContentEncoding.java

Modified: jakarta/commons/proper/betwixt/trunk/src/test/org/apache/commons/betwixt/TestCollectionMapping.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/betwixt/trunk/src/test/org/apache/commons/betwixt/TestCollectionMapping.java?rev=225872&r1=225871&r2=225872&view=diff
==============================================================================
--- jakarta/commons/proper/betwixt/trunk/src/test/org/apache/commons/betwixt/TestCollectionMapping.java
(original)
+++ jakarta/commons/proper/betwixt/trunk/src/test/org/apache/commons/betwixt/TestCollectionMapping.java
Thu Jul 28 13:17:55 2005
@@ -108,6 +108,7 @@
         beanWriter.setWriteEmptyElements(true);
         beanWriter.getBindingConfiguration().setMapIDs(false);
         beanWriter.getXMLIntrospector().register(new InputSource(new StringReader(MAPPING)));
+        beanWriter.setEndOfLine("\n"); //force to \n so expected values match for sure
         beanWriter.write(container);
 
         String output = outputWriter.toString();

Modified: jakarta/commons/proper/betwixt/trunk/src/test/org/apache/commons/betwixt/TestMultiMapping.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/betwixt/trunk/src/test/org/apache/commons/betwixt/TestMultiMapping.java?rev=225872&r1=225871&r2=225872&view=diff
==============================================================================
--- jakarta/commons/proper/betwixt/trunk/src/test/org/apache/commons/betwixt/TestMultiMapping.java
(original)
+++ jakarta/commons/proper/betwixt/trunk/src/test/org/apache/commons/betwixt/TestMultiMapping.java
Thu Jul 28 13:17:55 2005
@@ -61,6 +61,7 @@
             beanWriter.enablePrettyPrint();
 		    beanWriter.setWriteEmptyElements(true);
 		    beanWriter.getXMLIntrospector().register(source);
+            beanWriter.setEndOfLine("\n"); //force to ensure matches on expected
 		    beanWriter.write(partyBean);
 		    String expectedOut = "<?xml version='1.0' ?>\n" +
 		                     "  <party id=\"1\">\n" +

Modified: jakarta/commons/proper/betwixt/trunk/src/test/org/apache/commons/betwixt/TestReferenceMapping.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/betwixt/trunk/src/test/org/apache/commons/betwixt/TestReferenceMapping.java?rev=225872&r1=225871&r2=225872&view=diff
==============================================================================
--- jakarta/commons/proper/betwixt/trunk/src/test/org/apache/commons/betwixt/TestReferenceMapping.java
(original)
+++ jakarta/commons/proper/betwixt/trunk/src/test/org/apache/commons/betwixt/TestReferenceMapping.java
Thu Jul 28 13:17:55 2005
@@ -113,6 +113,7 @@
         beanWriter.setWriteEmptyElements(true);
         beanWriter.getBindingConfiguration().setMapIDs(false);
         beanWriter.getXMLIntrospector().register(new InputSource(new StringReader(MAPPING)));
+        beanWriter.setEndOfLine("\n"); //force to ensure matches on expected
         beanWriter.write(container);
 
         String output = outputWriter.toString();

Modified: jakarta/commons/proper/betwixt/trunk/src/test/org/apache/commons/betwixt/io/TestBeanWriter.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/betwixt/trunk/src/test/org/apache/commons/betwixt/io/TestBeanWriter.java?rev=225872&r1=225871&r2=225872&view=diff
==============================================================================
--- jakarta/commons/proper/betwixt/trunk/src/test/org/apache/commons/betwixt/io/TestBeanWriter.java
(original)
+++ jakarta/commons/proper/betwixt/trunk/src/test/org/apache/commons/betwixt/io/TestBeanWriter.java
Thu Jul 28 13:17:55 2005
@@ -53,7 +53,7 @@
                 null, 
                 null, 
                 "element");
-         assertEquals("<element></element>\n", out.getBuffer().toString()); 
     
+         assertEquals("<element></element>" + writer.getEndOfLine(), out.getBuffer().toString());
      
     }
 
 
@@ -80,6 +80,6 @@
                 null, 
                 null, 
                 "element");
-         assertEquals("<element/>\n", out.getBuffer().toString());       
+         assertEquals("<element/>" + writer.getEndOfLine(), out.getBuffer().toString());
      
     }
 }

Modified: jakarta/commons/proper/betwixt/trunk/src/test/org/apache/commons/betwixt/strategy/TestMixedContentEncoding.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/betwixt/trunk/src/test/org/apache/commons/betwixt/strategy/TestMixedContentEncoding.java?rev=225872&r1=225871&r2=225872&view=diff
==============================================================================
--- jakarta/commons/proper/betwixt/trunk/src/test/org/apache/commons/betwixt/strategy/TestMixedContentEncoding.java
(original)
+++ jakarta/commons/proper/betwixt/trunk/src/test/org/apache/commons/betwixt/strategy/TestMixedContentEncoding.java
Thu Jul 28 13:17:55 2005
@@ -114,6 +114,7 @@
         BeanWriter writer = new BeanWriter(out);
         writer.getXMLIntrospector().getConfiguration().setAttributesForPrimitives(false);
         writer.getBindingConfiguration().setMapIDs(false);
+        writer.setEndOfLine("\n"); //force to \n so expected values match for sure
         writer.write(element);
         
         String expected = "<?xml version='1.0'?><Element>\n<value>&lt;greeting&gt;What
Ho Jeeves!&lt;/greeting&gt;</value>\n</Element>\n";
@@ -137,6 +138,7 @@
         elementInfo.getElementDescriptor().getElementDescriptors()[0]
             .getOptions().addOption(MixedContentEncodingStrategy.ENCODING_OPTION_NAME, "CDATA");
 
          
+        writer.setEndOfLine("\n"); //force to \n so expected values match for sure
         writer.write(element);
         
         String expected = "<?xml version='1.0'?><Element>\n<value><![CDATA[<greeting>What
Ho Jeeves!</greeting>]]></value>\n</Element>\n";
@@ -159,6 +161,7 @@
         XMLBeanInfo elementInfo = writer.getXMLIntrospector().introspect(Element.class);
         elementInfo.getElementDescriptor().getElementDescriptors()[0]
             .getOptions().addOption("org.apache.commons.betwixt.mixed-content-encoding",
"escaped");
+        writer.setEndOfLine("\n"); //force to \n so expected values match for sure
         writer.write(element);
         
         String expected = "<?xml version='1.0'?><Element>\n<value>&lt;greeting&gt;What
Ho Jeeves!&lt;/greeting&gt;</value>\n</Element>\n";
@@ -178,6 +181,7 @@
         BeanWriter writer = new BeanWriter(out);
         writer.getXMLIntrospector().getConfiguration().setAttributesForPrimitives(false);
         writer.getBindingConfiguration().setMapIDs(false);
+        writer.setEndOfLine("\n"); //force to \n so expected values match for sure
         writer.write(bean);
         
         String expected = "<?xml version='1.0'?>" +
@@ -201,6 +205,7 @@
         writer.getXMLIntrospector().getConfiguration().setAttributesForPrimitives(false);
         writer.getBindingConfiguration().setMapIDs(false);
         writer.setMixedContentEncodingStrategy(new TestBaseMixedContentEncoding(false));
+        writer.setEndOfLine("\n"); //force to \n so expected values match for sure
         writer.write(element);
         
         String expected = "<?xml version='1.0'?><Element>\n<value>&lt;greeting&gt;What
Ho Jeeves!&lt;/greeting&gt;</value>\n</Element>\n";
@@ -220,6 +225,7 @@
         writer.getXMLIntrospector().getConfiguration().setAttributesForPrimitives(false);
         writer.getBindingConfiguration().setMapIDs(false);
         writer.setMixedContentEncodingStrategy(new TestBaseMixedContentEncoding(true));
+        writer.setEndOfLine("\n"); //force to \n so expected values match for sure
         writer.write(element);
         
         String expected = "<?xml version='1.0'?><Element>\n<value><![CDATA[<greeting>What
Ho Jeeves!</greeting>]]></value>\n</Element>\n";



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message