incubator-bval-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r1159811 - /incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/provider/src/test/java/org/apache/bval/jsr303/dynamic/DynamicMetaGraphManagementTest.java
Date Fri, 19 Aug 2011 22:52:45 GMT
Author: mbenson
Date: Fri Aug 19 22:52:44 2011
New Revision: 1159811

URL: http://svn.apache.org/viewvc?rev=1159811&view=rev
Log:
commit failing test because dynamically generated tip metaProperties should not automatically
cascade

Modified:
    incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/provider/src/test/java/org/apache/bval/jsr303/dynamic/DynamicMetaGraphManagementTest.java

Modified: incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/provider/src/test/java/org/apache/bval/jsr303/dynamic/DynamicMetaGraphManagementTest.java
URL: http://svn.apache.org/viewvc/incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/provider/src/test/java/org/apache/bval/jsr303/dynamic/DynamicMetaGraphManagementTest.java?rev=1159811&r1=1159810&r2=1159811&view=diff
==============================================================================
--- incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/provider/src/test/java/org/apache/bval/jsr303/dynamic/DynamicMetaGraphManagementTest.java
(original)
+++ incubator/bval/sandbox/lang3-work/bval-jsr303-dynamic/provider/src/test/java/org/apache/bval/jsr303/dynamic/DynamicMetaGraphManagementTest.java
Fri Aug 19 22:52:44 2011
@@ -18,6 +18,7 @@ package org.apache.bval.jsr303.dynamic;
 
 import static org.hamcrest.CoreMatchers.is;
 import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertThat;
 
 import javax.validation.Validation;
@@ -26,6 +27,7 @@ import javax.validation.constraints.NotN
 import org.apache.bval.jsr303.ApacheValidationProvider;
 import org.apache.bval.jsr303.ApacheValidatorConfiguration;
 import org.apache.bval.jsr303.example.Book;
+import org.apache.bval.model.FeaturesCapable;
 import org.apache.bval.model.MetaBean;
 import org.apache.bval.model.MetaProperty;
 import org.apache.commons.proxy2.stub.AnnotationFactory;
@@ -71,6 +73,9 @@ public class DynamicMetaGraphManagementT
     public void testGetImmediateProperty() {
         assertThat(dynamicValidatorContext.writable().getMeta(Book.class, "title"), is(MetaProperty.class));
         assertThat(dynamicValidatorContext.readOnly().getMeta(Book.class, "title"), is(MetaProperty.class));
+        FeaturesCapable meta = dynamicValidatorContext.readOnly().getMeta(Model.class, "property");
+        assertThat(meta, is(MetaProperty.class));
+        assertNull(((MetaProperty) meta).getMetaBean());
     }
 
     @Test
@@ -309,4 +314,16 @@ public class DynamicMetaGraphManagementT
             Assert.assertNotSame(previous, current);
         }
     }
+
+    public static class Model {
+        private String property;
+
+        public String getProperty() {
+            return property;
+        }
+
+        public void setProperty(String property) {
+            this.property = property;
+        }
+    }
 }



Mime
View raw message