click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r1034714 - /click/trunk/click/extras/test/org/apache/click/extras/control/ColorPickerTest.java
Date Sat, 13 Nov 2010 09:56:25 GMT
Author: sabob
Date: Sat Nov 13 09:56:25 2010
New Revision: 1034714

URL: http://svn.apache.org/viewvc?rev=1034714&view=rev
Log:
improved test

Modified:
    click/trunk/click/extras/test/org/apache/click/extras/control/ColorPickerTest.java

Modified: click/trunk/click/extras/test/org/apache/click/extras/control/ColorPickerTest.java
URL: http://svn.apache.org/viewvc/click/trunk/click/extras/test/org/apache/click/extras/control/ColorPickerTest.java?rev=1034714&r1=1034713&r2=1034714&view=diff
==============================================================================
--- click/trunk/click/extras/test/org/apache/click/extras/control/ColorPickerTest.java (original)
+++ click/trunk/click/extras/test/org/apache/click/extras/control/ColorPickerTest.java Sat
Nov 13 09:56:25 2010
@@ -51,27 +51,29 @@ public class ColorPickerTest extends Tes
     public void testValidate() {
         MockContext mockContext = MockContext.initContext();
         MockRequest mr = mockContext.getMockRequest();
-        Map<String, Object> paras = mr.getParameterMap();
+        Map<String, Object> params = mr.getParameterMap();
         
         ColorPicker cp = new ColorPicker("color");
         
-        paras.put("color","#fff");
+        params.put("color","#fff");
         assertTrue(cp.onProcess());
         assertTrue(cp.isValid());
         assertEquals("#fff",cp.getValue());
-        
-        paras.remove("color");
+
+        cp = new ColorPicker("color");
+        params.remove("color");
         assertTrue(cp.onProcess());
         assertTrue(cp.isValid());
         assertEquals("",cp.getValue());
-        
+
+        params.put("color", "");
         cp.setRequired(true);
         assertTrue(cp.onProcess());
         assertFalse(cp.isValid());
         
         cp = new ColorPicker("color");
         
-        paras.put("color", "invalid");
+        params.put("color", "invalid");
         assertTrue(cp.onProcess());
         assertFalse(cp.isValid());
         assertEquals("invalid",cp.getValue());



Mime
View raw message