I am using properties stored/defined in my blueprint.xml:
<cm:property-placeholder id="props.placeholder" persistent-id="props.blueprint">
<cm:default-properties>
...
<cm:property name="time.daysHistory" value="4" />
</cm:default-properties>
</cm:property-placeholder>
I am using this properties via injection (@PropertyInject
) or with this syntax{{time.daysHistory}}
.
Is there a way to read and or set those properies from within my Bluprinttests?
I tried context.getProperties()
but this returns an empty map.
Like Claus mentioned you need to use the
useOverridePropertiesWithConfigAdmin
method. However note, you need to return the same pid value as the one configured in your blueprint.Your blueprint:
In your test add:
EDIT: Here is how I have done it:
In my route I have injected properties:
My blueprint:
My test: