shale-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gred...@apache.org
Subject svn commit: r639462 - in /shale/framework/branches/SHALE_1_0_X/shale-validator/src/test: java/org/apache/shale/validator/converter/ java/org/apache/shale/validator/validator/ resources/org/apache/shale/validator/
Date Thu, 20 Mar 2008 21:17:22 GMT
Author: greddin
Date: Thu Mar 20 14:17:22 2008
New Revision: 639462

URL: http://svn.apache.org/viewvc?rev=639462&view=rev
Log:
SHALE-486

Fixed validator test property references so the tests will pass.

 * Changed the "errors.long" reference to "Long.unconverted"
 * Changed the property in TestBundle.properties from "errors.Long" to 
   "Long.unconverted".
 * Changed the property to be pulled from the default bundle from 
   "errors.integer" to "Integer.unconverted".
 * Changed the assertion for the "undefined" property to be *not* null since a 
   string should be returned by default.


Modified:
    shale/framework/branches/SHALE_1_0_X/shale-validator/src/test/java/org/apache/shale/validator/converter/AbstractConverterTestCase.java
    shale/framework/branches/SHALE_1_0_X/shale-validator/src/test/java/org/apache/shale/validator/validator/AbstractValidatorTestCase.java
    shale/framework/branches/SHALE_1_0_X/shale-validator/src/test/resources/org/apache/shale/validator/TestBundle.properties

Modified: shale/framework/branches/SHALE_1_0_X/shale-validator/src/test/java/org/apache/shale/validator/converter/AbstractConverterTestCase.java
URL: http://svn.apache.org/viewvc/shale/framework/branches/SHALE_1_0_X/shale-validator/src/test/java/org/apache/shale/validator/converter/AbstractConverterTestCase.java?rev=639462&r1=639461&r2=639462&view=diff
==============================================================================
--- shale/framework/branches/SHALE_1_0_X/shale-validator/src/test/java/org/apache/shale/validator/converter/AbstractConverterTestCase.java
(original)
+++ shale/framework/branches/SHALE_1_0_X/shale-validator/src/test/java/org/apache/shale/validator/converter/AbstractConverterTestCase.java
Thu Mar 20 14:17:22 2008
@@ -105,18 +105,18 @@
         String message = null;
 
         // Check a message that should be overridden by the application
-        message = converter.message(facesContext, "errors.long");
+        message = converter.message(facesContext, "Long.unconverted");
         assertNotNull(message);
         assertEquals("Custom Long Error Message", message);
 
         // Check a message that should be grabbed from the default resources
-        message = converter.message(facesContext, "errors.integer");
+        message = converter.message(facesContext, "Integer.unconverted");
         assertNotNull(message);
-        assertEquals(defaultBundle.getString("errors.integer"), message);
+        assertEquals(defaultBundle.getString("Integer.unconverted"), message);
 
         // Check a message that should be undefined
         message = converter.message(facesContext, "???undefined???");
-        assertNull(message);
+        assertNotNull(message);
 
     }
 

Modified: shale/framework/branches/SHALE_1_0_X/shale-validator/src/test/java/org/apache/shale/validator/validator/AbstractValidatorTestCase.java
URL: http://svn.apache.org/viewvc/shale/framework/branches/SHALE_1_0_X/shale-validator/src/test/java/org/apache/shale/validator/validator/AbstractValidatorTestCase.java?rev=639462&r1=639461&r2=639462&view=diff
==============================================================================
--- shale/framework/branches/SHALE_1_0_X/shale-validator/src/test/java/org/apache/shale/validator/validator/AbstractValidatorTestCase.java
(original)
+++ shale/framework/branches/SHALE_1_0_X/shale-validator/src/test/java/org/apache/shale/validator/validator/AbstractValidatorTestCase.java
Thu Mar 20 14:17:22 2008
@@ -145,18 +145,18 @@
         String message = null;
 
         // Check a message that should be overridden by the application
-        message = validator.message(facesContext, "errors.long");
+        message = validator.message(facesContext, "Long.unconverted");
         assertNotNull(message);
         assertEquals("Custom Long Error Message", message);
 
         // Check a message that should be grabbed from the default resources
-        message = validator.message(facesContext, "errors.integer");
+        message = validator.message(facesContext, "Integer.unconverted");
         assertNotNull(message);
-        assertEquals(defaultBundle.getString("errors.integer"), message);
+        assertEquals(defaultBundle.getString("Integer.unconverted"), message);
 
         // Check a message that should be undefined
         message = validator.message(facesContext, "???undefined???");
-        assertNull(message);
+        assertNotNull(message);
 
     }
 

Modified: shale/framework/branches/SHALE_1_0_X/shale-validator/src/test/resources/org/apache/shale/validator/TestBundle.properties
URL: http://svn.apache.org/viewvc/shale/framework/branches/SHALE_1_0_X/shale-validator/src/test/resources/org/apache/shale/validator/TestBundle.properties?rev=639462&r1=639461&r2=639462&view=diff
==============================================================================
--- shale/framework/branches/SHALE_1_0_X/shale-validator/src/test/resources/org/apache/shale/validator/TestBundle.properties
(original)
+++ shale/framework/branches/SHALE_1_0_X/shale-validator/src/test/resources/org/apache/shale/validator/TestBundle.properties
Thu Mar 20 14:17:22 2008
@@ -16,5 +16,5 @@
 # limitations under the License.
 # -----------------------------------------------------------------------------
 
-errors.Long=Custom Long Error Message
+Long.unconverted=Custom Long Error Message
 



Mime
View raw message