[
https://issues.apache.org/jira/browse/SLING-5478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15234834#comment-15234834
]
Stefan Seifert commented on SLING-5478:
---------------------------------------
ah, this was my failure, something went wrong applying the patch to my lokal
svn workspace. the tests are running fine.
however some parts still need to be fixed:
# ItemData.newMixing methods is not used at all - it can be removed
# cosmetic: Please move all implemente methods above the {{--- unsupported
operations ---}} section
# the implementation of the Node.getIndex() method does not conform with the
API contract. following [1] this method should return always 1, and only other
numbers for same-name-sibling nodes (which are not supported at all in jcr-mock
and discouraged to use anyway). so the implementation should be changed to
always return 1 and the unit tests depending on it need to change as well.
# the unit tests for the mixin usecases should also cover the canAddMixin
method and the "true" part of the
MockNode.addMixin/"hasProperty("jcr:mixinTypes")" method
# the unit tests for the move method should also cover moving a tree, not only
a single node
i started fixing 1 and 2 in
https://github.com/stefanseifert/sling/commits/SLING-5478, but then stopped
when detecting 3 and the others.
[1]
http://www.day.com/specs/jsr170/javadocs/jcr-2.0/javax/jcr/Node.html#getIndex%28%29
> Implement MockNode methods regarding mixin, reordering and move
> ---------------------------------------------------------------
>
> Key: SLING-5478
> URL: https://issues.apache.org/jira/browse/SLING-5478
> Project: Sling
> Issue Type: Improvement
> Components: JCR, Testing
> Affects Versions: Testing JCR Mock 1.1.10
> Reporter: Danilo Cugia
> Assignee: Stefan Seifert
> Priority: Minor
> Labels: test
> Fix For: Testing JCR Mock 1.1.14
>
>
> Implement the following operations on a MockNode object:
> - Add mixin
> - Get index
> - Get mixin types
> - Node repositioning (node.orderBefore)
> - Remove mixin
> - Move
> PR: https://github.com/apache/sling/pull/121
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)