Author: hardy.ferentschik
Date: 2009-06-16 16:07:56 -0400 (Tue, 16 Jun 2009)
New Revision: 16811
Added:
validator/trunk/hibernate-validator/src/test/java/org/hibernate/validation/bootstrap/Customer.java
validator/trunk/hibernate-validator/src/test/java/org/hibernate/validation/bootstrap/Order.java
Modified:
validator/trunk/hibernate-validator/src/test/java/org/hibernate/validation/bootstrap/ValidationTest.java
Log:
Added missing test entities
Added:
validator/trunk/hibernate-validator/src/test/java/org/hibernate/validation/bootstrap/Customer.java
===================================================================
---
validator/trunk/hibernate-validator/src/test/java/org/hibernate/validation/bootstrap/Customer.java
(rev 0)
+++
validator/trunk/hibernate-validator/src/test/java/org/hibernate/validation/bootstrap/Customer.java 2009-06-16
20:07:56 UTC (rev 16811)
@@ -0,0 +1,70 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed 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.
+*/
+package org.hibernate.validation.bootstrap;
+
+import java.util.HashSet;
+import java.util.Set;
+import javax.validation.Valid;
+
+import org.hibernate.validation.constraints.NotEmpty;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class Customer {
+ @NotEmpty
+ private String firstName;
+ private String middleName;
+ @NotEmpty
+ private String lastName;
+
+ @Valid
+ private Set<Order> orders = new HashSet<Order>();
+
+ public void addOrder(Order order) {
+ orders.add( order );
+ }
+
+ public Set<Order> getOrders() {
+ return orders;
+ }
+
+ public String getFirstName() {
+ return firstName;
+ }
+
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
+
+ public String getMiddleName() {
+ return middleName;
+ }
+
+ public void setMiddleName(String middleName) {
+ this.middleName = middleName;
+ }
+
+ public String getLastName() {
+ return lastName;
+ }
+
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
+}
\ No newline at end of file
Property changes on:
validator/trunk/hibernate-validator/src/test/java/org/hibernate/validation/bootstrap/Customer.java
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added:
validator/trunk/hibernate-validator/src/test/java/org/hibernate/validation/bootstrap/Order.java
===================================================================
---
validator/trunk/hibernate-validator/src/test/java/org/hibernate/validation/bootstrap/Order.java
(rev 0)
+++
validator/trunk/hibernate-validator/src/test/java/org/hibernate/validation/bootstrap/Order.java 2009-06-16
20:07:56 UTC (rev 16811)
@@ -0,0 +1,36 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* Licensed 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.
+*/
+package org.hibernate.validation.bootstrap;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class Order {
+ @NotNull
+ Integer orderNumber;
+
+ public Integer getOrderNumber() {
+ return orderNumber;
+ }
+
+ public void setOrderNumber(Integer orderNumber) {
+ this.orderNumber = orderNumber;
+ }
+}
\ No newline at end of file
Property changes on:
validator/trunk/hibernate-validator/src/test/java/org/hibernate/validation/bootstrap/Order.java
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Modified:
validator/trunk/hibernate-validator/src/test/java/org/hibernate/validation/bootstrap/ValidationTest.java
===================================================================
---
validator/trunk/hibernate-validator/src/test/java/org/hibernate/validation/bootstrap/ValidationTest.java 2009-06-16
20:04:55 UTC (rev 16810)
+++
validator/trunk/hibernate-validator/src/test/java/org/hibernate/validation/bootstrap/ValidationTest.java 2009-06-16
20:07:56 UTC (rev 16811)
@@ -37,7 +37,6 @@
import org.hibernate.validation.engine.ConstraintValidatorFactoryImpl;
import org.hibernate.validation.engine.HibernateValidatorConfiguration;
import org.hibernate.validation.engine.ValidatorFactoryImpl;
-import org.hibernate.validation.engine.Customer;
import org.hibernate.validation.HibernateValidationProvider;
/**