IComponentSpecification spec = parsePage("PropertySpecifications.page");
checkList("propertySpecificationNames", new String[]
{ "bool", "init", "longInitialValue", "persist" }, spec.getPropertySpecificationNames());
IPropertySpecification ps = spec.getPropertySpecification("bool");
assertEquals("name", "bool", ps.getName());
assertEquals("persistent", false, ps.isPersistent());
assertEquals("type", "boolean", ps.getType());
assertNull("initialValue", ps.getInitialValue());
checkLine(ps, 24);
ps = spec.getPropertySpecification("init");
assertEquals("name", "init", ps.getName());
assertEquals("persistent", false, ps.isPersistent());
assertNull("type", ps.getType());
// Starting with release 4.0, the initial value is a binding reference
// with an appropriate prefix. In 3.0 it was always an OGNL expression.
assertEquals("initialValue", "ognl:pageName", ps.getInitialValue());
checkLine(ps, 26);
ps = spec.getPropertySpecification("persist");
assertEquals("name", "persist", ps.getName());
assertEquals("persistent", true, ps.isPersistent());
assertNull("type", ps.getType());
assertNull("initialValue", ps.getInitialValue());
checkLine(ps, 25);
ps = spec.getPropertySpecification("longInitialValue");
assertEquals("ognl:long.initial.value", ps.getInitialValue());
ps = spec.getPropertySpecification("unknown");
assertNull("Unknown PropertySpecification", ps);
}