MCPcopy Index your code
hub / github.com/OpenTSDB/opentsdb / addLeafCollision

Method addLeafCollision

test/tree/TestBranch.java:206–219  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

204 }
205
206 @Test
207 public void addLeafCollision() throws Exception {
208 final Tree tree = TestTree.buildTestTree();
209 final Branch branch = buildTestBranch(tree);;
210
211 Leaf leaf = new Leaf();
212 leaf.setDisplayName("Alarms");
213 leaf.setTsuid("0001");
214
215 assertFalse(branch.addLeaf(leaf, tree));
216 assertEquals(2, branch.getBranches().size());
217 assertEquals(2, branch.getLeaves().size());
218 assertEquals(1, tree.getCollisions().size());
219 }
220
221 @Test (expected = IllegalArgumentException.class)
222 public void addChildNull() throws Exception {

Callers

nothing calls this directly

Calls 9

buildTestTreeMethod · 0.95
buildTestBranchMethod · 0.95
setDisplayNameMethod · 0.95
setTsuidMethod · 0.95
addLeafMethod · 0.95
getBranchesMethod · 0.95
getLeavesMethod · 0.95
getCollisionsMethod · 0.95
sizeMethod · 0.65

Tested by

no test coverage detected