Package org.apache.accumulo.core.security.ColumnVisibility

Examples of org.apache.accumulo.core.security.ColumnVisibility.Node


    assertEquals("[\"δΊ”\"]", cv.toString());
  }

  @Test
  public void testParseTree() {
    Node node = parse("(W)|(U&V)");
    assertNode(node, NodeType.OR, 0, 9);
    assertNode(node.getChildren().get(0), NodeType.TERM, 1, 2);
    assertNode(node.getChildren().get(1), NodeType.AND, 5, 8);
  }
View Full Code Here


    assertNode(node.getChildren().get(1), NodeType.AND, 5, 8);
  }

  @Test
  public void testParseTreeWithNoChildren() {
    Node node = parse("ABC");
    assertNode(node, NodeType.TERM, 0, 3);
  }
View Full Code Here

    assertNode(node, NodeType.TERM, 0, 3);
  }

  @Test
  public void testParseTreeWithTwoChildren() {
    Node node = parse("ABC|DEF");
    assertNode(node, NodeType.OR, 0, 7);
    assertNode(node.getChildren().get(0), NodeType.TERM, 0, 3);
    assertNode(node.getChildren().get(1), NodeType.TERM, 4, 7);
  }
View Full Code Here

    assertNode(node.getChildren().get(1), NodeType.TERM, 4, 7);
  }

  @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);
  }
View Full Code Here

    assertNode(node.getChildren().get(1), NodeType.TERM, 5, 8);
  }

  @Test
  public void testParseTreeWithParenthesizedChildren() {
    Node node = parse("ABC|(DEF&GHI)");
    assertNode(node, NodeType.OR, 0, 13);
    assertNode(node.getChildren().get(0), NodeType.TERM, 0, 3);
    assertNode(node.getChildren().get(1), NodeType.AND, 5, 12);
    assertNode(node.getChildren().get(1).children.get(0), NodeType.TERM, 5, 8);
    assertNode(node.getChildren().get(1).children.get(1), NodeType.TERM, 9, 12);
  }
View Full Code Here

    assertNode(node.getChildren().get(1).children.get(1), NodeType.TERM, 9, 12);
  }

  @Test
  public void testParseTreeWithMoreParentheses() {
    Node node = parse("(W)|(U&V)");
    assertNode(node, NodeType.OR, 0, 9);
    assertNode(node.getChildren().get(0), NodeType.TERM, 1, 2);
    assertNode(node.getChildren().get(1), NodeType.AND, 5, 8);
    assertNode(node.getChildren().get(1).children.get(0), NodeType.TERM, 5, 6);
    assertNode(node.getChildren().get(1).children.get(1), NodeType.TERM, 7, 8);
  }
View Full Code Here

  }

  @Test
  public void testEmptyParseTreesAreEqual() {
    Comparator<Node> comparator = new NodeComparator(new byte[] {});
    Node empty = new ColumnVisibility().getParseTree();
    assertEquals(0, comparator.compare(empty, parse("")));
  }
View Full Code Here

TOP

Related Classes of org.apache.accumulo.core.security.ColumnVisibility.Node

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.