[hibernate-commits] Hibernate SVN: r20125 - validator/trunk/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/constrainttypes.

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Sun Aug 8 11:00:21 EDT 2010


Author: gunnar.morling
Date: 2010-08-08 11:00:19 -0400 (Sun, 08 Aug 2010)
New Revision: 20125

Added:
   validator/trunk/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/constrainttypes/ConstraintsWithIllegalRetentionPolicies.java
Removed:
   validator/trunk/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/constrainttypes/ConstraintWithWrongRetentionPolicy.java
   validator/trunk/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/constrainttypes/ConstraintWithoutRetentionPolicy.java
Log:
HV-299: Refactored retention policy check test

Deleted: validator/trunk/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/constrainttypes/ConstraintWithWrongRetentionPolicy.java
===================================================================
--- validator/trunk/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/constrainttypes/ConstraintWithWrongRetentionPolicy.java	2010-08-08 11:27:49 UTC (rev 20124)
+++ validator/trunk/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/constrainttypes/ConstraintWithWrongRetentionPolicy.java	2010-08-08 15:00:19 UTC (rev 20125)
@@ -1,31 +0,0 @@
-// $Id: ConstraintWithWrongRetentionPolicy.java 19033 Aug 1, 2010 5:44:13 PM gunnar.morling $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, 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.validator.ap.testmodel.constrainttypes;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import javax.validation.Constraint;
-
-/**
- * @author Gunnar Morling
- */
- at Constraint(validatedBy = { })
- at Retention(RetentionPolicy.CLASS)
-public @interface ConstraintWithWrongRetentionPolicy {
-
-}

Deleted: validator/trunk/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/constrainttypes/ConstraintWithoutRetentionPolicy.java
===================================================================
--- validator/trunk/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/constrainttypes/ConstraintWithoutRetentionPolicy.java	2010-08-08 11:27:49 UTC (rev 20124)
+++ validator/trunk/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/constrainttypes/ConstraintWithoutRetentionPolicy.java	2010-08-08 15:00:19 UTC (rev 20125)
@@ -1,28 +0,0 @@
-// $Id: ConstraintWithoutRetentionPolicy.java 19033 Aug 1, 2010 5:44:13 PM gunnar.morling $
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, 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.validator.ap.testmodel.constrainttypes;
-
-import javax.validation.Constraint;
-
-/**
- * @author Gunnar Morling
- */
- at Constraint(validatedBy = { })
-public @interface ConstraintWithoutRetentionPolicy {
-
-}

Copied: validator/trunk/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/constrainttypes/ConstraintsWithIllegalRetentionPolicies.java (from rev 20121, validator/trunk/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/constrainttypes/ConstraintWithWrongRetentionPolicy.java)
===================================================================
--- validator/trunk/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/constrainttypes/ConstraintsWithIllegalRetentionPolicies.java	                        (rev 0)
+++ validator/trunk/hibernate-validator-annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/constrainttypes/ConstraintsWithIllegalRetentionPolicies.java	2010-08-08 15:00:19 UTC (rev 20125)
@@ -0,0 +1,55 @@
+// $Id: ConstraintWithWrongRetentionPolicy.java 19033 Aug 1, 2010 5:44:13 PM gunnar.morling $
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, 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.validator.ap.testmodel.constrainttypes;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import javax.validation.Constraint;
+
+/**
+ * @author Gunnar Morling
+ */
+public interface ConstraintsWithIllegalRetentionPolicies {
+
+	/**
+	 * Compilation error expected as wrong retention policy is given.
+	 */
+	@Constraint(validatedBy = { })
+	@Retention(RetentionPolicy.CLASS)
+	public @interface ConstraintWithWrongRetentionPolicy {
+
+	}
+
+	/**
+	 * Compilation error expected as no retention policy is given.
+	 */
+	@Constraint(validatedBy = { })
+	public @interface ConstraintWithoutRetentionPolicy {
+
+	}
+
+	/**
+	 * No compilation error expected as correct retention policy is given.
+	 */
+	@Constraint(validatedBy = { })
+	@Retention(RetentionPolicy.RUNTIME)
+	public @interface ConstraintWithCorrectRetentionPolicy {
+
+	}
+
+}
\ No newline at end of file



More information about the hibernate-commits mailing list