tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject svn commit: r1196384 - in /tapestry/tapestry5/trunk/tapestry-core/src: main/java/org/apache/tapestry5/internal/services/ test/java/org/apache/tapestry5/internal/services/
Date Tue, 01 Nov 2011 23:13:24 GMT
Author: hlship
Date: Tue Nov  1 23:13:23 2011
New Revision: 1196384

URL: http://svn.apache.org/viewvc?rev=1196384&view=rev
Log:
Minor corrections to broken tests

Modified:
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/FieldValidatorSourceImpl.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/RenderQueueImpl.java
    tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/FieldValidatorSourceImplTest.java
    tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/MarkupWriterImplTest.java

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/FieldValidatorSourceImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/FieldValidatorSourceImpl.java?rev=1196384&r1=1196383&r2=1196384&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/FieldValidatorSourceImpl.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/FieldValidatorSourceImpl.java
Tue Nov  1 23:13:23 2011
@@ -154,7 +154,7 @@ public class FieldValidatorSourceImpl im
         if (overrideMessages.contains(generalKey))
             return overrideMessages.get(generalKey);
 
-        throw new IllegalArgumentException(String.format("Validator '%s' requires a validation
constraint (of type %s) but none was provided. The constraint may be provided inside the @Validator
annotaton on the property, or in the associated component message catalog as key '%s' or key
'%s'.", validatorType, constraintType.getName(), perFormKey,
+        throw new IllegalArgumentException(String.format("Validator '%s' requires a validation
constraint (of type %s) but none was provided. The constraint may be provided inside the @Validator
annotation on the property, or in the associated component message catalog as key '%s' or
key '%s'.", validatorType, constraintType.getName(), perFormKey,
                 generalKey));
     }
 

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/RenderQueueImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/RenderQueueImpl.java?rev=1196384&r1=1196383&r2=1196384&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/RenderQueueImpl.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/RenderQueueImpl.java
Tue Nov  1 23:13:23 2011
@@ -18,6 +18,7 @@ import org.apache.tapestry5.ComponentRes
 import org.apache.tapestry5.MarkupWriter;
 import org.apache.tapestry5.TapestryMarkers;
 import org.apache.tapestry5.ioc.internal.util.CollectionFactory;
+import org.apache.tapestry5.ioc.internal.util.InternalUtils;
 import org.apache.tapestry5.ioc.util.Stack;
 import org.apache.tapestry5.runtime.RenderCommand;
 import org.apache.tapestry5.runtime.RenderQueue;
@@ -74,7 +75,7 @@ public class RenderQueueImpl implements 
         }
         catch (RuntimeException ex)
         {
-            String message = String.format("Render queue error in %s: %s", command, ex);
+            String message = String.format("Render queue error in %s: %s", command, InternalUtils.toMessage(ex));
 
             logger.error(message, ex);
 

Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/FieldValidatorSourceImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/FieldValidatorSourceImplTest.java?rev=1196384&r1=1196383&r2=1196384&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/FieldValidatorSourceImplTest.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/FieldValidatorSourceImplTest.java
Tue Nov  1 23:13:23 2011
@@ -75,7 +75,7 @@ public class FieldValidatorSourceImplTes
         }
         catch (IllegalArgumentException ex)
         {
-            assertEquals(ex.getMessage(), "Unknown validator type 'foo'.  Configured validators
are alpha, beta.");
+            assertEquals(ex.getMessage(), "Unknown validator type 'foo'. Configured validators
are alpha, beta.");
         }
 
         verify();
@@ -367,7 +367,7 @@ public class FieldValidatorSourceImplTes
         {
             assertEquals(
                     ex.getMessage(),
-                    "Validator 'minlength' requires a validation constraint (of type java.lang.Integer)
but none was provided. The constraint may be provided inside the @Validator annotaton on the
property, or in the associated component message catalog as key 'myform-fred-minlength' or
key 'fred-minlength'. ");
+                    "Validator 'minlength' requires a validation constraint (of type java.lang.Integer)
but none was provided. The constraint may be provided inside the @Validator annotation on
the property, or in the associated component message catalog as key 'myform-fred-minlength'
or key 'fred-minlength'.");
         }
 
         verify();

Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/MarkupWriterImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/MarkupWriterImplTest.java?rev=1196384&r1=1196383&r2=1196384&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/MarkupWriterImplTest.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/MarkupWriterImplTest.java
Tue Nov  1 23:13:23 2011
@@ -209,7 +209,7 @@ public class MarkupWriterImplTest extend
         catch (RuntimeException ex)
         {
             assertMessageContains(ex, "Writing attributes of the element 'img' failed.",
-                    "A attribute name or value is omitted [src, foo.png, width, 20, 30].",
+                    "An attribute name or value is omitted [src, foo.png, width, 20, 30].",
                     "Please provide an even number of values, alternating names and values");
         }
     }



Mime
View raw message