Package net.opentsdb.tree

Examples of net.opentsdb.tree.Tree.addRule()


  }
 
  @Test
  public void addRule() throws Exception {
    final Tree tree = new Tree();
    tree.addRule(new TreeRule());
    assertNotNull(tree.getRules());
    assertEquals(1, tree.getRules().size());
  }
 
  @Test
View Full Code Here


    final Tree tree = new Tree();
    TreeRule rule = new TreeRule(1);
    rule.setDescription("MyRule");
    rule.setLevel(1);
    rule.setOrder(1);
    tree.addRule(rule);
    assertNotNull(tree.getRules());
    assertEquals(1, tree.getRules().size());
    assertEquals("MyRule", tree.getRules().get(1).get(1).getDescription());
   
  }
View Full Code Here

  }
 
  @Test (expected = IllegalArgumentException.class)
  public void addRuleNull() throws Exception {
    final Tree tree = new Tree();
    tree.addRule(null);
  }

  @Test
  public void addCollision() throws Exception {
    final Tree tree = buildTestTree();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.