MCPcopy Create free account
hub / github.com/OpenTSDB/opentsdb / addLeafExists

Method addLeafExists

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

Source from the content-addressed store, hash-verified

189 }
190
191 @Test
192 public void addLeafExists() throws Exception {
193 final Tree tree = TestTree.buildTestTree();
194 final Branch branch = buildTestBranch(tree);;
195
196 Leaf leaf = new Leaf();
197 leaf.setDisplayName("Alarms");
198 leaf.setTsuid("ABCD");
199
200 assertFalse(branch.addLeaf(leaf, tree));
201 assertEquals(2, branch.getBranches().size());
202 assertEquals(2, branch.getLeaves().size());
203 assertNull(tree.getCollisions());
204 }
205
206 @Test
207 public void addLeafCollision() 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