Search in sources :

Example 11 with Node

use of org.apache.accumulo.core.security.ColumnVisibility.Node in project accumulo by apache.

the class ColumnVisibilityTest method testParseTreeWithNoChildren.

@Test
public void testParseTreeWithNoChildren() {
    Node node = parse("ABC");
    assertNode(node, NodeType.TERM, 0, 3);
}
Also used : Node(org.apache.accumulo.core.security.ColumnVisibility.Node) Test(org.junit.Test)

Example 12 with Node

use of org.apache.accumulo.core.security.ColumnVisibility.Node in project accumulo by apache.

the class ColumnVisibilityTest method testParseTreeWithParenthesesAndTwoChildren.

@Test
public void testParseTreeWithParenthesesAndTwoChildren() {
    Node node = parse("(ABC|DEF)");
    assertNode(node, NodeType.OR, 1, 8);
    assertNode(node.getChildren().get(0), NodeType.TERM, 1, 4);
    assertNode(node.getChildren().get(1), NodeType.TERM, 5, 8);
}
Also used : Node(org.apache.accumulo.core.security.ColumnVisibility.Node) Test(org.junit.Test)

Aggregations

Node (org.apache.accumulo.core.security.ColumnVisibility.Node)12 Test (org.junit.Test)9 DocumentVisibility (org.apache.rya.mongodb.document.visibility.DocumentVisibility)2 ArrayList (java.util.ArrayList)1 LinkedHashSet (java.util.LinkedHashSet)1 NodeComparator (org.apache.accumulo.core.security.ColumnVisibility.NodeComparator)1