Hi!

I have a problem with the Sling Mock Testing:

Trying to use slick mock with resourcetyperesolver other like the default.
Changing to default it works. But an unsupportedoperation exception is raised 
because I wan't to use queries.
JCR_MOCK and JCR_OAK doesn't work in this setup. The following exception is 
raised

org.apache.sling.testing.mock.osgi.ReferenceViolationException: Multiple 
matches found for unary reference 'factory' for class 
de.htsolutions.sling.testing.FormularService

After debugging I find the the reason: There are two ResourceResolverFactory 
instances in the context and the framework doesn't know which to use.

Problem in setup or bug or a thinking error by me?

Here is a github repo with an example:
https://github.com/thodte/slingtesting

--
Mit freundlichen Grüßen
Christoph Thodte

Mobil:  +49 (0)174 2555201
Office:  +49 (0)34973 299945

E-Mail:      
[email protected]<mailto:[email protected]>
Website:   www.ht-solutions.de<http://www.ht-solutions.de/>

Reply via email to