use of org.apache.jackrabbit.spi.QPropertyDefinition in project jackrabbit by apache.
the class TestAll method testItemNodeType.
/** Test for node type item definitions. */
public void testItemNodeType() {
QNodeTypeDefinition def = getNodeType("itemNodeType");
assertEquals("itemNodeType primaryItemName", FACTORY.create(TEST_NAMESPACE, "emptyItem"), def.getPrimaryItemName());
assertEquals("itemNodeType propertyDefs", 10, def.getPropertyDefs().length);
QPropertyDefinition pdef = getPropDef("itemNodeType", null);
assertTrue("itemNodeType wildcard property", pdef.definesResidual());
}
use of org.apache.jackrabbit.spi.QPropertyDefinition in project jackrabbit by apache.
the class TestAll method testComputeItem.
/** Test for the <code>compute</code> parent version action. */
public void testComputeItem() {
QPropertyDefinition def = getPropDef("itemNodeType", "computeItem");
assertEquals("computeItem onParentVersion", OnParentVersionAction.COMPUTE, def.getOnParentVersion());
}
use of org.apache.jackrabbit.spi.QPropertyDefinition in project jackrabbit by apache.
the class TestAll method testAutoCreateItem.
/** Test for the <code>autoCreated</code> item definition attribute. */
public void testAutoCreateItem() {
QPropertyDefinition def = getPropDef("itemNodeType", "autoCreatedItem");
assertEquals("autoCreatedItem autoCreated", true, def.isAutoCreated());
}
use of org.apache.jackrabbit.spi.QPropertyDefinition in project jackrabbit by apache.
the class TestAll method testPathProperty2.
/** Test for the <code>path</code> property definition type. */
public void testPathProperty2() {
QPropertyDefinition def = getPropDef("propertyNodeType", "pathProperty2");
assertEquals("pathProperty requiredType", PropertyType.PATH, def.getRequiredType());
assertEquals("pathProperty valueConstraints", 1, def.getValueConstraints().length);
assertEquals("pathProperty valueConstraints[0]", "{http://www.apache.org/jackrabbit/test}testPath\t{}*", (def.getValueConstraints())[0].getString());
assertNull("pathProperty defaultValues", def.getDefaultValues());
}
use of org.apache.jackrabbit.spi.QPropertyDefinition in project jackrabbit by apache.
the class TestAll method testNameProperty.
/** Test for the <code>name</code> property definition type. */
public void testNameProperty() {
QPropertyDefinition def = getPropDef("propertyNodeType", "nameProperty");
assertEquals("nameProperty requiredType", PropertyType.NAME, def.getRequiredType());
assertEquals("nameProperty valueConstraints", 1, def.getValueConstraints().length);
assertEquals("nameProperty valueConstraints[0]", "{http://www.apache.org/jackrabbit/test}testName", (def.getValueConstraints())[0].getString());
assertEquals("nameProperty defaultValues", 1, def.getDefaultValues().length);
assertEquals("nameProperty defaultValues[0]", "test:testName", getDefaultValue(def, 0));
}
Aggregations