You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Stefan Seifert (JIRA)" <ji...@apache.org> on 2015/05/13 18:53:59 UTC
[jira] [Resolved] (SLING-4654) Support
ResourceResolver.findResources with JCR_MOCK
[ https://issues.apache.org/jira/browse/SLING-4654?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stefan Seifert resolved SLING-4654.
-----------------------------------
Resolution: Fixed
Fix Version/s: Testing Sling Mock 1.2.2
Assignee: Stefan Seifert
Completed: At revision: 1679239
good catch, a config property was missing for the jcr resource provider factory. unit test added.
> Support ResourceResolver.findResources with JCR_MOCK
> ----------------------------------------------------
>
> Key: SLING-4654
> URL: https://issues.apache.org/jira/browse/SLING-4654
> Project: Sling
> Issue Type: Improvement
> Components: Testing
> Affects Versions: Testing Sling Mock 1.2.0
> Reporter: Konrad Windszus
> Assignee: Stefan Seifert
> Fix For: Testing Sling Mock 1.2.2
>
> Attachments: SLING-4654-testcasev2.diff
>
>
> Although JCR Mocks supports mocking queries (https://sling.apache.org/documentation/development/jcr-mock.html#mocking-queries) this is not being propagated to the Sling API when using Sling Mocks with JCR_MOCK as the resource resolver type. Whenever you execute {{ResourceResolver.findResources}} on such a mock it will always return no results.
> The expected behaviour would be that any mocked queries through {{MockJcr.setQueryResult}} would be considered also for {{ResourceResolver.findResources}}. Attached is a test case for Sling Mocks which currently fails due to findResource not returning anything.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)