Annotation Type SetConfig
Define this annotation on a test class or method to use the
ConfigurationAdmin service
to update the persisted properties for the configuration whose pid matches the pid() attribute.
Updates should be applied top-down for each test context scope, from with the outermost (class-level) to the
innermost (method-level).-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionClass<?>Whenpid()is set to the default value ofComponent.NAME, set this attribute to a class whose name should be used instead.Specify a configuration pid to update with values specified byproperty().String[]Parsed likeComponent.property().
-
Element Details
-
pid
String pidSpecify a configuration pid to update with values specified byproperty(). The default value isComponent.NAME, which is a special string ("$") that can be used to specify the name of thecomponent()class as a configuration PID.- Returns:
- a configuration pid
- Default:
- "$"
-
component
Class<?> componentWhenpid()is set to the default value ofComponent.NAME, set this attribute to a class whose name should be used instead. This can be more convenient when usingSetConfigin combination withOsgiContextImpl.registerInjectActivateService(Class). The default value isVoid, which seems perfectly fine for a pid, but which in practice is a somewhat challenging class to construct for binding the configuration to.- Returns:
- the configurable component class
- Default:
- java.lang.Void.class
-
property
String[] propertyParsed likeComponent.property().- Returns:
- osgi config properties
- Default:
- {}
-