click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r1034721 - in /click/trunk/click/extras/test/org/apache/click/extras/control: DoubleFieldTest.java IntegerFieldTest.java LongFieldTest.java NumberFieldTest.java
Date Sat, 13 Nov 2010 10:27:36 GMT
Author: sabob
Date: Sat Nov 13 10:27:35 2010
New Revision: 1034721

URL: http://svn.apache.org/viewvc?rev=1034721&view=rev
Log:
cleanup

Modified:
    click/trunk/click/extras/test/org/apache/click/extras/control/DoubleFieldTest.java
    click/trunk/click/extras/test/org/apache/click/extras/control/IntegerFieldTest.java
    click/trunk/click/extras/test/org/apache/click/extras/control/LongFieldTest.java
    click/trunk/click/extras/test/org/apache/click/extras/control/NumberFieldTest.java

Modified: click/trunk/click/extras/test/org/apache/click/extras/control/DoubleFieldTest.java
URL: http://svn.apache.org/viewvc/click/trunk/click/extras/test/org/apache/click/extras/control/DoubleFieldTest.java?rev=1034721&r1=1034720&r2=1034721&view=diff
==============================================================================
--- click/trunk/click/extras/test/org/apache/click/extras/control/DoubleFieldTest.java (original)
+++ click/trunk/click/extras/test/org/apache/click/extras/control/DoubleFieldTest.java Sat
Nov 13 10:27:35 2010
@@ -71,14 +71,14 @@ public class DoubleFieldTest extends Tes
 
         request.getParameterMap().put("id", "0");
         
-        // Test not required zero value
+        // Test not required + zero value
         doubleField.setRequired(false);
         assertTrue(doubleField.onProcess());
         assertTrue(doubleField.isValid());
         assertEquals("0", doubleField.getValue());
         assertEquals(new Double(0), doubleField.getValueObject());
         
-        // Test required zero value
+        // Test required + zero value
         doubleField.setRequired(true);
         assertTrue(doubleField.onProcess());
         assertTrue(doubleField.isValid());
@@ -87,14 +87,16 @@ public class DoubleFieldTest extends Tes
         
         request.getParameterMap().clear();
 
-        // Test not required blank value
+        // Test not required + blank value
+        request.getParameterMap().put("id", "");
         doubleField.setRequired(false);
         assertTrue(doubleField.onProcess());
         assertTrue(doubleField.isValid());
         assertEquals("", doubleField.getValue());
         assertNull(doubleField.getValueObject());
 
-        // Test required blank value
+        // Test required + blank value
+        request.getParameterMap().put("id", "");
         doubleField.setRequired(true);
         assertTrue(doubleField.onProcess());
         assertFalse(doubleField.isValid());

Modified: click/trunk/click/extras/test/org/apache/click/extras/control/IntegerFieldTest.java
URL: http://svn.apache.org/viewvc/click/trunk/click/extras/test/org/apache/click/extras/control/IntegerFieldTest.java?rev=1034721&r1=1034720&r2=1034721&view=diff
==============================================================================
--- click/trunk/click/extras/test/org/apache/click/extras/control/IntegerFieldTest.java (original)
+++ click/trunk/click/extras/test/org/apache/click/extras/control/IntegerFieldTest.java Sat
Nov 13 10:27:35 2010
@@ -45,13 +45,16 @@ public class IntegerFieldTest extends Te
         assertEquals("123.4", intField.getValue());
         assertNull(intField.getValueObject());
         
-        request.getParameterMap().clear();
+        // Test not required + blank value
+        request.getParameterMap().put("id", "");
         
         assertTrue(intField.onProcess());
         assertTrue(intField.isValid());
         assertEquals("", intField.getValue());
         assertNull(intField.getValueObject());
-        
+
+        // Test not required + blank value
+        request.getParameterMap().put("id", "");
         intField.setRequired(true);
         assertTrue(intField.onProcess());
         assertFalse(intField.isValid());

Modified: click/trunk/click/extras/test/org/apache/click/extras/control/LongFieldTest.java
URL: http://svn.apache.org/viewvc/click/trunk/click/extras/test/org/apache/click/extras/control/LongFieldTest.java?rev=1034721&r1=1034720&r2=1034721&view=diff
==============================================================================
--- click/trunk/click/extras/test/org/apache/click/extras/control/LongFieldTest.java (original)
+++ click/trunk/click/extras/test/org/apache/click/extras/control/LongFieldTest.java Sat Nov
13 10:27:35 2010
@@ -44,8 +44,9 @@ public class LongFieldTest extends TestC
         assertFalse(longField.isValid());
         assertEquals("123.4", longField.getValue());
         assertNull(longField.getValueObject());
-        
-        request.getParameterMap().clear();
+
+        // Test not required + blank value
+        request.getParameterMap().put("id", "");
         
         assertTrue(longField.onProcess());
         assertTrue(longField.isValid());

Modified: click/trunk/click/extras/test/org/apache/click/extras/control/NumberFieldTest.java
URL: http://svn.apache.org/viewvc/click/trunk/click/extras/test/org/apache/click/extras/control/NumberFieldTest.java?rev=1034721&r1=1034720&r2=1034721&view=diff
==============================================================================
--- click/trunk/click/extras/test/org/apache/click/extras/control/NumberFieldTest.java (original)
+++ click/trunk/click/extras/test/org/apache/click/extras/control/NumberFieldTest.java Sat
Nov 13 10:27:35 2010
@@ -181,8 +181,9 @@ public class NumberFieldTest extends Tes
         engF = new NumberField("en");
         engF.setPattern("0");
         
+        // Test required + blank value
         engF.setRequired(true);
-        params.remove("en");
+        params.put("en", "");
         
         assertTrue(engF.onProcess());
         assertFalse(engF.isValid());



Mime
View raw message