Author: jvdrean
Date: 2008-02-11 16:56:19 +0100 (Mon, 11 Feb 2008)
New Revision: 7502

Modified:
   
xwiki-platform/core/branches/xwiki-core-1.2/xwiki-core/src/test/java/com/xpn/xwiki/XWikiTest.java
Log:
Fixed clearName unit tests

Modified: 
xwiki-platform/core/branches/xwiki-core-1.2/xwiki-core/src/test/java/com/xpn/xwiki/XWikiTest.java
===================================================================
--- 
xwiki-platform/core/branches/xwiki-core-1.2/xwiki-core/src/test/java/com/xpn/xwiki/XWikiTest.java
   2008-02-11 15:53:46 UTC (rev 7501)
+++ 
xwiki-platform/core/branches/xwiki-core-1.2/xwiki-core/src/test/java/com/xpn/xwiki/XWikiTest.java
   2008-02-11 15:56:19 UTC (rev 7502)
@@ -143,27 +143,23 @@
         assertTrue(copy.getCreationDate().equals(sourceCreationDate));
     }
 
-    public void testClearNameWithoutStripDotsWithoutAscii() {
-        String name = "O�&&{{.txt";
-        name = this.xwiki.clearName(name, false, false, context);
-        assertTrue(name.equals("Oe&&{{.txt"));
+    public void testClearNameWithoutStripDotsWithoutAscii()
+    {
+        assertEquals("ee{&.txt", this.xwiki.clearName("\u00E9\u00EA{&.txt", 
false, false, context));
     }
 
-    public void testClearNameWithoutStripDotsWithAscii() {
-        String name = "O�&&{{.txt";
-        name = this.xwiki.clearName(name, false, true, context);
-        assertTrue(name.equals("Oe.txt"));
+    public void testClearNameWithoutStripDotsWithAscii() 
+    {
+        assertEquals("ee.txt", this.xwiki.clearName("\u00E9\u00EA{&.txt", 
false, true, context));
     }
 
-    public void testClearNameWithStripDotsWithoutAscii() {
-        String name = "O�&&{{.txt";
-        name = this.xwiki.clearName(name, true, false, context);
-        assertTrue(name.equals("Oe&&{{txt"));
+    public void testClearNameWithStripDotsWithoutAscii()
+    {
+        assertEquals("ee{&txt", this.xwiki.clearName("\u00E9\u00EA{&.txt", 
true, false, context));
     }
 
-    public void testClearNameWithStripDotsWithAscii() {
-        String name = "O�&&{{.txt";
-        name = this.xwiki.clearName(name, true, true, context);
-        assertTrue(name.equals("Oetxt"));
+    public void testClearNameWithStripDotsWithAscii()           
+    {
+        assertEquals("eetxt", this.xwiki.clearName("\u00E9\u00EA{&.txt", true, 
true, context));
     }
 }

_______________________________________________
notifications mailing list
notifications@xwiki.org
http://lists.xwiki.org/mailman/listinfo/notifications

Reply via email to