Author: akushunin
Date: 2007-10-15 08:53:14 -0400 (Mon, 15 Oct 2007)
New Revision: 3371
Added:
trunk/framework/impl/src/test/java/org/richfaces/component/util/HtmlUnitTest.java
Modified:
trunk/framework/impl/src/main/java/org/richfaces/component/util/HtmlUtil.java
Log:
RF-1096
JUnit Tests added
Modified: trunk/framework/impl/src/main/java/org/richfaces/component/util/HtmlUtil.java
===================================================================
---
trunk/framework/impl/src/main/java/org/richfaces/component/util/HtmlUtil.java 2007-10-15
12:31:58 UTC (rev 3370)
+++
trunk/framework/impl/src/main/java/org/richfaces/component/util/HtmlUtil.java 2007-10-15
12:53:14 UTC (rev 3371)
@@ -65,7 +65,7 @@
if (matcher.group(1).indexOf("::")==-1)
{
// make new id selector here using matcher.group(1)
- matcher.appendReplacement(sb, "#new value");
+ matcher.appendReplacement(sb, "#new-value");
}
}
matcher.appendTail(sb);
Added: trunk/framework/impl/src/test/java/org/richfaces/component/util/HtmlUnitTest.java
===================================================================
--- trunk/framework/impl/src/test/java/org/richfaces/component/util/HtmlUnitTest.java
(rev 0)
+++
trunk/framework/impl/src/test/java/org/richfaces/component/util/HtmlUnitTest.java 2007-10-15
12:53:14 UTC (rev 3371)
@@ -0,0 +1,30 @@
+package org.richfaces.component.util;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIInput;
+
+import junit.framework.TestCase;
+
+//Initial draft
+
+public class HtmlUnitTest extends TestCase {
+
+ public void testExpandIdSelector()throws Exception {
+
+ UIComponent comp = new UIInput();
+ String str = HtmlUtil.expandIdSelector(".class_form+#:Test .class2
#_1aaaa:",comp);
+ //System.out.println(str);
+ assertEquals(str,".class_form+#new-value .class2 #new-value");
+ try {
+ str = HtmlUtil.expandIdSelector(null, comp);
+ } catch (NullPointerException e) {
+ assertTrue(true);
+ }
+
+
+
+
+
+ }
+
+}
Property changes on:
trunk/framework/impl/src/test/java/org/richfaces/component/util/HtmlUnitTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Show replies by date