This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag 
org.apache.sling.testing.jcr-mock-1.1.14
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-jcr-mock.git

commit 076632832ca71ecdec058d8022d99d0a92b56a32
Author: Stefan Seifert <[email protected]>
AuthorDate: Fri Jun 10 10:32:52 2016 +0000

    SLING-5775 jcr-mock: Support PropertyDefinition flags
    
    git-svn-id: 
https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/jcr-mock@1747678 
13f79535-47bb-0310-9956-ffa450edef68
---
 .../sling/testing/mock/jcr/MockProperty.java       | 41 +++++++++++-----------
 .../sling/testing/mock/jcr/MockPropertyTest.java   |  6 ++++
 2 files changed, 27 insertions(+), 20 deletions(-)

diff --git a/src/main/java/org/apache/sling/testing/mock/jcr/MockProperty.java 
b/src/main/java/org/apache/sling/testing/mock/jcr/MockProperty.java
index 3e10fda..291a165 100644
--- a/src/main/java/org/apache/sling/testing/mock/jcr/MockProperty.java
+++ b/src/main/java/org/apache/sling/testing/mock/jcr/MockProperty.java
@@ -272,66 +272,67 @@ class MockProperty extends AbstractItem implements 
Property {
             return MockProperty.this.itemData.isMultiple();
         }
 
-        // --- unsupported operations ---
         @Override
-        public Value[] getDefaultValues() {
-            throw new UnsupportedOperationException();
+        public boolean isAutoCreated() {
+            return false;
         }
 
         @Override
-        public int getRequiredType() {
-            throw new UnsupportedOperationException();
+        public boolean isMandatory() {
+            return false;
         }
 
         @Override
-        public String[] getValueConstraints() {
-            throw new UnsupportedOperationException();
+        public boolean isProtected() {
+            return false;
         }
-
+        
         @Override
-        public NodeType getDeclaringNodeType() {
-            throw new UnsupportedOperationException();
+        public boolean isFullTextSearchable() {
+            return false;
         }
 
         @Override
-        public String getName() {
-            throw new UnsupportedOperationException();
+        public boolean isQueryOrderable() {
+            return false;
         }
-
+        
+        // --- unsupported operations ---
         @Override
-        public int getOnParentVersion() {
+        public Value[] getDefaultValues() {
             throw new UnsupportedOperationException();
         }
 
         @Override
-        public boolean isAutoCreated() {
+        public int getRequiredType() {
             throw new UnsupportedOperationException();
         }
 
         @Override
-        public boolean isMandatory() {
+        public String[] getValueConstraints() {
             throw new UnsupportedOperationException();
         }
 
         @Override
-        public boolean isProtected() {
+        public NodeType getDeclaringNodeType() {
             throw new UnsupportedOperationException();
         }
 
         @Override
-        public String[] getAvailableQueryOperators() {
+        public String getName() {
             throw new UnsupportedOperationException();
         }
 
         @Override
-        public boolean isFullTextSearchable() {
+        public int getOnParentVersion() {
             throw new UnsupportedOperationException();
         }
 
         @Override
-        public boolean isQueryOrderable() {
+        public String[] getAvailableQueryOperators() {
             throw new UnsupportedOperationException();
         }
+
     }
 
 }
diff --git 
a/src/test/java/org/apache/sling/testing/mock/jcr/MockPropertyTest.java 
b/src/test/java/org/apache/sling/testing/mock/jcr/MockPropertyTest.java
index 81eee32..949dbb3 100644
--- a/src/test/java/org/apache/sling/testing/mock/jcr/MockPropertyTest.java
+++ b/src/test/java/org/apache/sling/testing/mock/jcr/MockPropertyTest.java
@@ -78,6 +78,12 @@ public class MockPropertyTest {
         assertFalse(prop1.isMultiple());
         assertFalse(prop1.getDefinition().isMultiple());
         assertEquals(6, prop1.getLength());
+
+        assertFalse(prop1.getDefinition().isProtected());
+        assertFalse(prop1.getDefinition().isAutoCreated());
+        assertFalse(prop1.getDefinition().isMandatory());
+        assertFalse(prop1.getDefinition().isFullTextSearchable());
+        assertFalse(prop1.getDefinition().isQueryOrderable());
     }
 
     @Test

-- 
To stop receiving notification emails like this one, please contact
"[email protected]" <[email protected]>.

Reply via email to