You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2010/04/13 08:37:38 UTC
svn commit: r933492 - in
/camel/trunk/components/camel-bean-validator/src/test:
java/org/apache/camel/component/bean/validator/ resources/META-INF/
Author: davsclaus
Date: Tue Apr 13 06:37:38 2010
New Revision: 933492
URL: http://svn.apache.org/viewvc?rev=933492&view=rev
Log:
CAMEL-2565: Applied patch from Christian Mueller to include the XML based tests.
Added:
camel/trunk/components/camel-bean-validator/src/test/resources/META-INF/
camel/trunk/components/camel-bean-validator/src/test/resources/META-INF/validation.xml (with props)
Modified:
camel/trunk/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/BeanValidatorRouteTest.java
camel/trunk/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/BeanValidatorXMLConfigurationRouteTest.java
Modified: camel/trunk/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/BeanValidatorRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/BeanValidatorRouteTest.java?rev=933492&r1=933491&r2=933492&view=diff
==============================================================================
--- camel/trunk/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/BeanValidatorRouteTest.java (original)
+++ camel/trunk/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/BeanValidatorRouteTest.java Tue Apr 13 06:37:38 2010
@@ -140,7 +140,6 @@ public class BeanValidatorRouteTest exte
} catch (RuntimeCamelException e) {
assertIsInstanceOf(BeanValidationException.class, e.getCause());
- System.out.println(e.getMessage());
BeanValidationException exception = (BeanValidationException) e.getCause();
Set<ConstraintViolation<Object>> constraintViolations = exception.getConstraintViolations();
@@ -177,7 +176,6 @@ public class BeanValidatorRouteTest exte
} catch (RuntimeCamelException e) {
assertIsInstanceOf(BeanValidationException.class, e.getCause());
- System.out.println(e.getMessage());
BeanValidationException exception = (BeanValidationException) e.getCause();
Set<ConstraintViolation<Object>> constraintViolations = exception.getConstraintViolations();
@@ -200,7 +198,6 @@ public class BeanValidatorRouteTest exte
} catch (RuntimeCamelException e) {
assertIsInstanceOf(BeanValidationException.class, e.getCause());
- System.out.println(e.getMessage());
BeanValidationException exception = (BeanValidationException) e.getCause();
Set<ConstraintViolation<Object>> constraintViolations = exception.getConstraintViolations();
@@ -250,7 +247,6 @@ public class BeanValidatorRouteTest exte
} catch (RuntimeCamelException e) {
assertIsInstanceOf(BeanValidationException.class, e.getCause());
- System.out.println(e.getMessage());
BeanValidationException exception = (BeanValidationException) e.getCause();
Set<ConstraintViolation<Object>> constraintViolations = exception.getConstraintViolations();
Modified: camel/trunk/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/BeanValidatorXMLConfigurationRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/BeanValidatorXMLConfigurationRouteTest.java?rev=933492&r1=933491&r2=933492&view=diff
==============================================================================
--- camel/trunk/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/BeanValidatorXMLConfigurationRouteTest.java (original)
+++ camel/trunk/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/BeanValidatorXMLConfigurationRouteTest.java Tue Apr 13 06:37:38 2010
@@ -16,13 +16,9 @@
*/
package org.apache.camel.component.bean.validator;
-import org.junit.Ignore;
-
-
/**
* @version $Revision$
*/
-@Ignore
public class BeanValidatorXMLConfigurationRouteTest extends BeanValidatorRouteTest {
Car createCar(String manufacturer, String licencePlate) {
Added: camel/trunk/components/camel-bean-validator/src/test/resources/META-INF/validation.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bean-validator/src/test/resources/META-INF/validation.xml?rev=933492&view=auto
==============================================================================
--- camel/trunk/components/camel-bean-validator/src/test/resources/META-INF/validation.xml (added)
+++ camel/trunk/components/camel-bean-validator/src/test/resources/META-INF/validation.xml Tue Apr 13 06:37:38 2010
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version
+ 2.0 (the "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0 Unless required by
+ applicable law or agreed to in writing, software distributed under the
+ License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ CONDITIONS OF ANY KIND, either express or implied. See the License for
+ the specific language governing permissions and limitations under the
+ License.
+-->
+<validation-config xmlns="http://jboss.org/xml/ns/javax/validation/configuration"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://jboss.org/xml/ns/javax/validation/configuration">
+
+ <default-provider>org.hibernate.validator.HibernateValidator</default-provider>
+ <message-interpolator>org.hibernate.validator.engine.ResourceBundleMessageInterpolator</message-interpolator>
+ <traversable-resolver>org.hibernate.validator.engine.resolver.DefaultTraversableResolver</traversable-resolver>
+ <constraint-validator-factory>org.hibernate.validator.engine.ConstraintValidatorFactoryImpl</constraint-validator-factory>
+ <constraint-mapping>/constraints-car.xml</constraint-mapping>
+
+</validation-config>
\ No newline at end of file
Propchange: camel/trunk/components/camel-bean-validator/src/test/resources/META-INF/validation.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/components/camel-bean-validator/src/test/resources/META-INF/validation.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: camel/trunk/components/camel-bean-validator/src/test/resources/META-INF/validation.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml