sling-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MeriƧ Taze <>
Subject Accessing bundles implementing same interface using TestReference annotation
Date Wed, 01 Feb 2012 13:14:27 GMT
Hi all,

I have a question about accessing bundles implementing the same
interface using TestReference annotation.
Here an example:

public interface Search {
    String search(String keyword);

And I have 3 classes and all implement Search interface:


However when I use

Search searchRef;

public void testFunc(){"some keywords");

It takes keyword) and I can not reach
other classes.
How can I reach all of them.

In other words, I am looking for something like this in junit:
    @Reference(cardinality = ReferenceCardinality.OPTIONAL_MULTIPLE ...
    private List<Search> searchers = new CopyOnWriteArrayList<Search>();

Thanks in advance.

View raw message