You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ss...@apache.org on 2015/02/21 09:46:14 UTC
svn commit: r1661299 -
/sling/site/trunk/content/documentation/development/osgi-mock.mdtext
Author: sseifert
Date: Sat Feb 21 08:46:14 2015
New Revision: 1661299
URL: http://svn.apache.org/r1661299
Log:
prepare documentation for upcoming OSGi Mock 1.2.0 release
Modified:
sling/site/trunk/content/documentation/development/osgi-mock.mdtext
Modified: sling/site/trunk/content/documentation/development/osgi-mock.mdtext
URL: http://svn.apache.org/viewvc/sling/site/trunk/content/documentation/development/osgi-mock.mdtext?rev=1661299&r1=1661298&r2=1661299&view=diff
==============================================================================
--- sling/site/trunk/content/documentation/development/osgi-mock.mdtext (original)
+++ sling/site/trunk/content/documentation/development/osgi-mock.mdtext Sat Feb 21 08:46:14 2015
@@ -22,17 +22,13 @@ The mock implementation supports:
* Instantiating OSGi `Bundle`, `BundleContext` and `ComponentContext` objects and navigate between them.
* Register OSGi SCR services and get references to service instances
-* Supports reading OSGi SCR metadata from `/OSGI-INF/<pid>.xml`
+* Supports reading OSGi SCR metadata from `/OSGI-INF/<pid>.xml` and from `/OSGI-INF/serviceComponents.xml`
* Apply service properties/component configuration provided in unit test and from SCR metadata
-* Inject SCR dependencies
+* Inject SCR dependencies - static and dynamic
* Call lifecycle methods for activating, deactivating or modifying SCR components
* Service and bundle listener implementation
* Mock implementation of `LogService` which logs to SLF4J in JUnit context
-The following features are *not supported*:
-
-* Dependencies are only injected and lifecycle methods are only called when initiated by the unit test
-
## Usage
@@ -129,7 +125,8 @@ Example:
Please note:
-* Injection does not take place automatically if a new service is added that is an (optional or mandatory) references of a service already registered. So you should ensure that you register you services in the correct order of their dependency chain.
+* You should ensure that you register you services in the correct order of their dependency chain.
+Only dynamic references will be handled automatically independent of registration order.
* The injectServices, activate and deactivate Methods can only work properly when the SCR XML metadata files
are preset in the classpath at `/OSGI-INF`. They are generated automatically by the Maven SCR plugin, but might be
missing if your clean and build the project within your IDE (e.g. Eclipse). In this case you have to compile the