cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From and...@apache.org
Subject svn commit: r747308 - /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/map/DataMapTest.java
Date Tue, 24 Feb 2009 08:38:41 GMT
Author: andrey
Date: Tue Feb 24 08:38:41 2009
New Revision: 747308

URL: http://svn.apache.org/viewvc?rev=747308&view=rev
Log:
fixing test, which fails on windows

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/map/DataMapTest.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/map/DataMapTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/map/DataMapTest.java?rev=747308&r1=747307&r2=747308&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/map/DataMapTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/map/DataMapTest.java
Tue Feb 24 08:38:41 2009
@@ -402,33 +402,35 @@
             assertEquals(expectedNames[i], proc.getName());
         }
     }
-    
+
 
     public void testQuoteSqlIdentifiersEcodeAsXML(){
         DataMap map = new DataMap("aaa");
-        map.setQuotingSQLIdentifiers(true);  
+        map.setQuotingSQLIdentifiers(true);
         StringWriter w = new StringWriter();
         XMLEncoder e = new XMLEncoder(new PrintWriter(w));
-        
+
+        String separator = System.getProperty("line.separator");
+
         StringBuffer s = new StringBuffer("<data-map project-version=\"");
-        s.append(String.valueOf(Project.CURRENT_PROJECT_VERSION));  
-        s.append("\">\n");     
-        s.append("<property name=\"quoteSqlIdentifiers\" value=\"true\"/>\n");    
 
-        s.append("</data-map>\n");
-        
+        s.append(String.valueOf(Project.CURRENT_PROJECT_VERSION));
+        s.append("\">").append(separator);
+        s.append("<property name=\"quoteSqlIdentifiers\" value=\"true\"/>").append(separator);
+        s.append("</data-map>").append(separator);
+
         map.encodeAsXML(e);
-        assertEquals(w.getBuffer().toString(), s.toString());  
-        
-        map.setQuotingSQLIdentifiers(false); 
+        assertEquals(w.getBuffer().toString(), s.toString());
+
+        map.setQuotingSQLIdentifiers(false);
         StringWriter w2 = new StringWriter();
         XMLEncoder e2 = new XMLEncoder(new PrintWriter(w2));
-        
+
         StringBuffer s2 = new StringBuffer("<data-map project-version=\"");
-        s2.append(String.valueOf(Project.CURRENT_PROJECT_VERSION)); 
-        s2.append("\">\n");          
-        s2.append("</data-map>\n");        
+        s2.append(String.valueOf(Project.CURRENT_PROJECT_VERSION));
+        s2.append("\">").append(separator);
+        s2.append("</data-map>").append(separator);
         map.encodeAsXML(e2);
-        assertEquals(w2.getBuffer().toString(), s2.toString());  
-        
+        assertEquals(w2.getBuffer().toString(), s2.toString());
+
     }
 }



Mime
View raw message