Package net.opentsdb.tree

Examples of net.opentsdb.tree.Tree


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


    assertEquals(1, tree.getRules().size());
  }
 
  @Test
  public void addRuleLevel() throws Exception {
    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);
  }
View Full Code Here

    tree.addRule(null);
  }

  @Test
  public void addCollision() throws Exception {
    final Tree tree = buildTestTree();
    assertNull(tree.getCollisions());
    tree.addCollision("010203", "AABBCCDD");
    assertEquals(1, tree.getCollisions().size());
  }
View Full Code Here

    assertEquals(1, tree.getCollisions().size());
  }
 
  @Test (expected = IllegalArgumentException.class)
  public void addCollisionNull() throws Exception {
    final Tree tree = buildTestTree();
    assertNull(tree.getCollisions());
    tree.addCollision(null, "AABBCCDD");
  }
View Full Code Here

    tree.addCollision(null, "AABBCCDD");
  }
 
  @Test (expected = IllegalArgumentException.class)
  public void addCollisionEmpty() throws Exception {
    final Tree tree = buildTestTree();
    assertNull(tree.getCollisions());
    tree.addCollision("", "AABBCCDD");
  }
View Full Code Here

    tree.addCollision("", "AABBCCDD");
  }
 
  @Test
  public void addNoMatch() throws Exception {
    final Tree tree = buildTestTree();
    assertNull(tree.getNotMatched());
    tree.addNotMatched("010203", "Bummer");
    assertEquals(1, tree.getNotMatched().size());
  }
View Full Code Here

    assertEquals(1, tree.getNotMatched().size());
  }
 
  @Test (expected = IllegalArgumentException.class)
  public void addNoMatchNull() throws Exception {
    final Tree tree = buildTestTree();
    assertNull(tree.getNotMatched());
    tree.addNotMatched(null, "Bummer");
  }
View Full Code Here

    tree.addNotMatched(null, "Bummer");
  }
 
  @Test (expected = IllegalArgumentException.class)
  public void addNoMatchEmpty() throws Exception {
    final Tree tree = buildTestTree();
    assertNull(tree.getNotMatched());
    tree.addNotMatched("", "Bummer");
  }
View Full Code Here

  }
 
  @Test
  public void storeTree() throws Exception {
    setupStorage(true, true);
    final Tree tree = buildTestTree();
    tree.setName("New Name");
    assertNotNull(tree.storeTree(storage.getTSDB(), false)
        .joinUninterruptibly());
  }
View Full Code Here

TOP

Related Classes of net.opentsdb.tree.Tree

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.