You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 10:18:34 UTC
[sling-org-apache-sling-testing-jcr-mock] 02/05: SLING-5774
jcr-mock: Support Node.getMixinNodeTypes
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 8d5810f7dc820f2e2ef1067dc59d45bc7cf7bb8b
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Fri Jun 10 10:30:36 2016 +0000
SLING-5774 jcr-mock: Support Node.getMixinNodeTypes
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/jcr-mock@1747677 13f79535-47bb-0310-9956-ffa450edef68
---
src/main/java/org/apache/sling/testing/mock/jcr/MockNode.java | 11 ++++++-----
.../java/org/apache/sling/testing/mock/jcr/MockNodeTest.java | 5 +++++
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/src/main/java/org/apache/sling/testing/mock/jcr/MockNode.java b/src/main/java/org/apache/sling/testing/mock/jcr/MockNode.java
index 9e49ced..cfed57d 100644
--- a/src/main/java/org/apache/sling/testing/mock/jcr/MockNode.java
+++ b/src/main/java/org/apache/sling/testing/mock/jcr/MockNode.java
@@ -315,6 +315,12 @@ class MockNode extends AbstractItem implements Node {
return false;
}
+ @Override
+ public NodeType[] getMixinNodeTypes() throws RepositoryException {
+ // we have no real mixin support - just assume no mixin nodetypes are set
+ return new NodeType[0];
+ }
+
// --- unsupported operations ---
@Override
public Property setProperty(final String name, final Value value, final int type) throws RepositoryException {
@@ -392,11 +398,6 @@ class MockNode extends AbstractItem implements Node {
}
@Override
- public NodeType[] getMixinNodeTypes() throws RepositoryException {
- throw new UnsupportedOperationException();
- }
-
- @Override
public PropertyIterator getReferences() throws RepositoryException {
throw new UnsupportedOperationException();
}
diff --git a/src/test/java/org/apache/sling/testing/mock/jcr/MockNodeTest.java b/src/test/java/org/apache/sling/testing/mock/jcr/MockNodeTest.java
index 41266e7..081c643 100644
--- a/src/test/java/org/apache/sling/testing/mock/jcr/MockNodeTest.java
+++ b/src/test/java/org/apache/sling/testing/mock/jcr/MockNodeTest.java
@@ -163,5 +163,10 @@ public class MockNodeTest {
assertNotNull(ntFile.getProperty(JcrConstants.JCR_CREATED).getDate());
assertNotNull(ntFile.getProperty("jcr:createdBy").getString());
}
+
+ @Test
+ public void testGetMixinNodeTypes() throws Exception {
+ assertEquals(0, this.node1.getMixinNodeTypes().length);
+ }
}
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.