[
https://issues.apache.org/jira/browse/SLING-6363?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15719712#comment-15719712
]
Stefan Seifert commented on SLING-6363:
---------------------------------------
Completed: At revision: 1772517 (1.x)
also changed:
- add SlingContext.addModelsForClasses method
- fix bug in addModelsForPackages that registered "sibling" packages with same
prefix as well
- make sure classpath scanning takes place only once for alle unit tests, not
for each unit test which requests the same package
- witch NodeTypeDefinitionScanner to osgi-mock ManifestScanner as well
> sling-mock: Automatically register Sling Models from Classpath
> --------------------------------------------------------------
>
> Key: SLING-6363
> URL: https://issues.apache.org/jira/browse/SLING-6363
> Project: Sling
> Issue Type: New Feature
> Components: Testing
> Reporter: Stefan Seifert
> Assignee: Stefan Seifert
> Labels: mocks
> Fix For: Testing Sling Mock 1.9.0, Testing Sling Mock 2.2.0
>
>
> up to this version sling models in unit tests only worked when registered
> beforehand with the addModelsForPackage(...) method.
> when running unit test with sling mocks existing bundle headers in MANIFEST
> files in the class path should be scanned for {{Sling-Model-Packages}} and
> {{Sling-Model-Classes}} entries, and those should be registered automatically.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)