()
| 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 { |
nothing calls this directly
no test coverage detected