How to write a junit for activate and deactivate method? | Community
Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Sachin_Arora_
Sachin_Arora_Accepted solution
New Participant
Jul 6, 2022 11:01 AM UTC

Please refer this document :
https://sling.apache.org/documentation/development/osgi-mock.html#activation-and-dependency-injection

// activate service

MockOsgi.activate(service, props);

 // deactivate service

MockOsgi.deactivate(service);

1 reply

Sachin_Arora_
Sachin_Arora_Accepted solution
New Participant
Jul 6, 2022 11:01 AM UTC

Please refer this document :
https://sling.apache.org/documentation/development/osgi-mock.html#activation-and-dependency-injection

// activate service

MockOsgi.activate(service, props);

 // deactivate service

MockOsgi.deactivate(service);

Translate