myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mat...@apache.org
Subject svn commit: r695697 - in /myfaces/trinidad/trunk_1.2.x/trinidad-api/src/test/java/org/apache/myfaces/trinidad/validator: DoubleRangeValidatorTest.java LongRangeValidatorTest.java
Date Tue, 16 Sep 2008 00:23:59 GMT
Author: matzew
Date: Mon Sep 15 17:23:58 2008
New Revision: 695697

URL: http://svn.apache.org/viewvc?rev=695697&view=rev
Log:
added test cases for TRINIDAD-1227

Modified:
    myfaces/trinidad/trunk_1.2.x/trinidad-api/src/test/java/org/apache/myfaces/trinidad/validator/DoubleRangeValidatorTest.java
    myfaces/trinidad/trunk_1.2.x/trinidad-api/src/test/java/org/apache/myfaces/trinidad/validator/LongRangeValidatorTest.java

Modified: myfaces/trinidad/trunk_1.2.x/trinidad-api/src/test/java/org/apache/myfaces/trinidad/validator/DoubleRangeValidatorTest.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk_1.2.x/trinidad-api/src/test/java/org/apache/myfaces/trinidad/validator/DoubleRangeValidatorTest.java?rev=695697&r1=695696&r2=695697&view=diff
==============================================================================
--- myfaces/trinidad/trunk_1.2.x/trinidad-api/src/test/java/org/apache/myfaces/trinidad/validator/DoubleRangeValidatorTest.java
(original)
+++ myfaces/trinidad/trunk_1.2.x/trinidad-api/src/test/java/org/apache/myfaces/trinidad/validator/DoubleRangeValidatorTest.java
Mon Sep 15 17:23:58 2008
@@ -182,6 +182,21 @@
     }
   }
 
+  public void testStringBasedValues()
+  {
+    DoubleRangeValidator validator = new DoubleRangeValidator();
+    Mock mock = buildMockUIComponent();
+    UIComponent component = (UIComponent) mock.proxy();
+    MockUIComponentWrapper wrapper = new MockUIComponentWrapper(mock, component);
+
+    String values[]   = {"200.05","500.00"};
+    validator.setMinimum(200);
+    for (int i = 0; i < values.length ; i++)
+    {
+      doTestValidate(validator, facesContext, wrapper, values[i]);
+    }
+  }
+
   public void testStateHolderSaveRestore()
   {
     DoubleRangeValidator validator = new DoubleRangeValidator();

Modified: myfaces/trinidad/trunk_1.2.x/trinidad-api/src/test/java/org/apache/myfaces/trinidad/validator/LongRangeValidatorTest.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk_1.2.x/trinidad-api/src/test/java/org/apache/myfaces/trinidad/validator/LongRangeValidatorTest.java?rev=695697&r1=695696&r2=695697&view=diff
==============================================================================
--- myfaces/trinidad/trunk_1.2.x/trinidad-api/src/test/java/org/apache/myfaces/trinidad/validator/LongRangeValidatorTest.java
(original)
+++ myfaces/trinidad/trunk_1.2.x/trinidad-api/src/test/java/org/apache/myfaces/trinidad/validator/LongRangeValidatorTest.java
Mon Sep 15 17:23:58 2008
@@ -182,6 +182,21 @@
     }
   }
 
+  public void testStringBasedValues()
+  {
+    LongRangeValidator validator = new LongRangeValidator();
+    Mock mock = buildMockUIComponent();
+    UIComponent component = (UIComponent) mock.proxy();
+    MockUIComponentWrapper wrapper = new MockUIComponentWrapper(mock, component);
+
+    String values[]   = {"200","500"};
+    validator.setMinimum(199);
+    for (int i = 0; i < values.length ; i++)
+    {
+      doTestValidate(validator, facesContext, wrapper, values[i]);
+    }
+  }
+
   public void testStateHolderSaveRestore()
   {
     LongRangeValidator validator = new LongRangeValidator();



Mime
View raw message