IComponentSpecification spec = parsePage("Property.page");
checkList("propertySpecificationNames", new String[]
{ "bool", "init", "longInit", "persist" }, spec.getPropertySpecificationNames());
IPropertySpecification ps = spec.getPropertySpecification("bool");
assertEquals("name", "bool", ps.getName());
assertEquals("persistent", false, ps.isPersistent());
// In a 4.0 DTD, type is always null.
assertNull("type", ps.getType());
// Note that no prefix is added. Initial value will be a string literal,
// or have a prefix and be something else.
assertNull("initialValue", ps.getInitialValue());
checkLine(ps, 24);
ps = spec.getPropertySpecification("init");
assertEquals("name", "init", ps.getName());
assertEquals("persistent", false, ps.isPersistent());
assertEquals("initialValue", "ognl:pageName", ps.getInitialValue());
checkLine(ps, 26);
ps = spec.getPropertySpecification("persist");
assertEquals("name", "persist", ps.getName());
assertEquals("persistent", true, ps.isPersistent());
assertNull("initialValue", ps.getInitialValue());
checkLine(ps, 25);
ps = spec.getPropertySpecification("longInit");
assertEquals("message:long-init-key", ps.getInitialValue());
ps = spec.getPropertySpecification("unknown");
assertNull("Unknown PropertySpecification", ps);
}