[prev in list] [next in list] [prev in thread] [next in thread]
List: jakarta-commons-dev
Subject: cvs commit: jakarta-commons/validator/src/test/org/apache/commons/validator TypeTest.java validator-
From: dwinterfeldt () apache ! org
Date: 2002-03-30 5:13:13
[Download RAW message or body]
dwinterfeldt 02/03/29 21:13:13
Modified: validator/src/test/org/apache/commons/validator
TypeTest.java validator-type.xml
Log:
Had a typo for the integer check and added a check that the results are the correct \
class for each numeric validation.
Revision Changes Path
1.2 +11 -4 \
jakarta-commons/validator/src/test/org/apache/commons/validator/TypeTest.java
Index: TypeTest.java
===================================================================
RCS file: /home/cvs/jakarta-commons/validator/src/test/org/apache/commons/validator/TypeTest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TypeTest.java 30 Mar 2002 04:21:03 -0000 1.1
+++ TypeTest.java 30 Mar 2002 05:13:12 -0000 1.2
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-commons/validator/src/test/org/apache/commons/validator/TypeTest.java,v \
1.1 2002/03/30 04:21:03 dwinterfeldt Exp $
- * $Revision: 1.1 $
- * $Date: 2002/03/30 04:21:03 $
+ * $Header: /home/cvs/jakarta-commons/validator/src/test/org/apache/commons/validator/TypeTest.java,v \
1.2 2002/03/30 05:13:12 dwinterfeldt Exp $ + * $Revision: 1.2 $
+ * $Date: 2002/03/30 05:13:12 $
*
* ====================================================================
*
@@ -78,7 +78,7 @@
* <p>Performs Validation Test for type validations.</p>
*
* @author David Winterfeldt
- * @version $Revision: 1.1 $ $Date: 2002/03/30 04:21:03 $
+ * @version $Revision: 1.2 $ $Date: 2002/03/30 05:13:12 $
*/
public class TypeTest extends TestCase {
@@ -183,6 +183,13 @@
assertNotNull("Results are null.", results);
Map hResultValues = results.getResultValueMap();
+
+ assertTrue("Expecting byte result to be an instance of Byte.", \
(hResultValues.get("byte") instanceof Byte)); + assertTrue("Expecting short \
result to be an instance of Short.", (hResultValues.get("short") instanceof Short)); \
+ assertTrue("Expecting integer result to be an instance of Integer.", \
(hResultValues.get("integer") instanceof Integer)); + assertTrue("Expecting \
long result to be an instance of Long.", (hResultValues.get("long") instanceof \
Long)); + assertTrue("Expecting float result to be an instance of Float.", \
(hResultValues.get("float") instanceof Float)); + assertTrue("Expecting double \
result to be an instance of Double.", (hResultValues.get("double") instanceof \
Double));
for (Iterator i = hResultValues.keySet().iterator(); i.hasNext(); ) {
String key = (String)i.next();
1.2 +1 -1 \
jakarta-commons/validator/src/test/org/apache/commons/validator/validator-type.xml
Index: validator-type.xml
===================================================================
RCS file: /home/cvs/jakarta-commons/validator/src/test/org/apache/commons/validator/validator-type.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- validator-type.xml 30 Mar 2002 04:21:03 -0000 1.1
+++ validator-type.xml 30 Mar 2002 05:13:12 -0000 1.2
@@ -39,7 +39,7 @@
<field property="short"
depends="short">
</field>
- <field property="int"
+ <field property="integer"
depends="int">
</field>
<field property="long"
--
To unsubscribe, e-mail: <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic