[ https://issues.apache.org/jira/browse/SLING-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bertrand Delacretaz closed SLING-3751. -------------------------------------- > Create a JUnit rule to inject a service reference into a test > ------------------------------------------------------------- > > Key: SLING-3751 > URL: https://issues.apache.org/jira/browse/SLING-3751 > Project: Sling > Issue Type: Improvement > Components: Testing > Reporter: Francesco Mari > Assignee: Antonio Sanso > Priority: Minor > Fix For: JUnit Core 1.0.10 > > > I have implemented a JUnit rule to inject a reference to a service into a > test class. For the JUnit rule to work, the test must be executed inside a > running instance of Sling. > The rule is implemented in [this > commit|https://github.com/mtarantino/sling/commit/200a2a0b766cced3a9c71e1d35cf349557800db8] > in [this fork|https://github.com/mtarantino/sling/tree/asanso] on GitHub. > An example of its use can be found in [this > commit|https://github.com/mtarantino/sling/commit/3a7ec91b0a75f578581ed3fd111600387ad29bd9] > in the same fork. -- This message was sent by Atlassian JIRA (v6.3.4#6332)