You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bryan Hunt edited this page Dec 30, 2013
·
7 revisions
ServiceLocator
When building JUnit integration tests in an OSGi environment, you may need to obtain a reference to a service. The ServiceLocator is a JUnit @Rule for just that purpose. The service locator will wait for the service (up to 1 second by default) and fail the test if the service is not found. You use the rule in your test as follows:
Some OSGi services require configuration properties. The ServiceConfigurator is an extension of the JUnit ServiceLocator@Rule for supplying those properties. You use the rule in your test as follows: