use of javax.jcr.PropertyIterator in project sling by apache.
the class MockNodeTest method testGetProperties.
@Test
public void testGetProperties() throws RepositoryException {
PropertyIterator properties = this.node1.getProperties();
Map<String, Property> props = propertiesToMap(properties);
assertEquals(2, properties.getSize());
assertEquals(this.prop1, props.get("prop1"));
assertTrue(this.node1.hasProperties());
assertTrue(this.node11.hasProperties());
properties = this.node1.getProperties("^prop.*$");
assertEquals(1, properties.getSize());
assertEquals(this.prop1, properties.next());
properties = this.node1.getProperties("unknown?");
assertEquals(0, properties.getSize());
}
Aggregations