use of org.apache.jackrabbit.oak.plugins.nodetype.TypePredicate in project jackrabbit-oak by apache.
the class NodeTypePredicateTest method multipleNodeTypesMatch.
@Test
public void multipleNodeTypesMatch() {
NodeState node = createNodeOfType(NT_FILE);
TypePredicate p = new TypePredicate(node, new String[] { NT_FOLDER, NT_RESOURCE, NT_FILE });
assertTrue(p.apply(node));
}
use of org.apache.jackrabbit.oak.plugins.nodetype.TypePredicate in project jackrabbit-oak by apache.
the class NodeTypePredicateTest method multipleNodeTypesMiss.
@Test
public void multipleNodeTypesMiss() {
NodeState node = createNodeOfType(NT_FILE);
TypePredicate p = new TypePredicate(node, new String[] { NT_FOLDER, NT_RESOURCE, JCR_CONTENT });
assertFalse(p.apply(node));
}
use of org.apache.jackrabbit.oak.plugins.nodetype.TypePredicate in project jackrabbit-oak by apache.
the class NodeTypePredicateTest method emptyNodeTypeList.
@Test
public void emptyNodeTypeList() {
NodeState node = createNodeOfType(NT_BASE);
TypePredicate p = new TypePredicate(node, new String[] {});
assertFalse(p.apply(node));
}
use of org.apache.jackrabbit.oak.plugins.nodetype.TypePredicate in project jackrabbit-oak by apache.
the class NodeTypePredicateTest method singleNodeTypeMiss.
@Test
public void singleNodeTypeMiss() {
NodeState node = createNodeOfType(NT_BASE);
TypePredicate p = new TypePredicate(node, new String[] { NT_FILE });
assertFalse(p.apply(node));
}
use of org.apache.jackrabbit.oak.plugins.nodetype.TypePredicate in project jackrabbit-oak by apache.
the class NodeTypePredicateTest method singleNodeTypeMatch.
@Test
public void singleNodeTypeMatch() {
NodeState node = createNodeOfType(NT_BASE);
TypePredicate p = new TypePredicate(node, new String[] { NT_BASE });
assertTrue(p.apply(node));
}
Aggregations