mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
enhance TreeUtil.build
This commit is contained in:
@@ -18,8 +18,8 @@ public class TreeTest {
|
||||
static {
|
||||
// 模拟数据
|
||||
nodeList.add(new TreeNode<>("1", "0", "系统管理", 5));
|
||||
nodeList.add(new TreeNode<>("11", "1", "用户管理", 222222));
|
||||
nodeList.add(new TreeNode<>("111", "11", "用户添加", 0));
|
||||
nodeList.add(new TreeNode<>("11", "1", "用户管理", 222222));
|
||||
|
||||
nodeList.add(new TreeNode<>("2", "0", "店铺管理", 1));
|
||||
nodeList.add(new TreeNode<>("21", "2", "商品管理", 44));
|
||||
@@ -33,6 +33,7 @@ public class TreeTest {
|
||||
for (Tree<String> tree : treeList) {
|
||||
Assert.assertNotNull(tree);
|
||||
Assert.assertEquals("0", tree.getParentId());
|
||||
// Console.log(tree);
|
||||
}
|
||||
|
||||
// 测试通过子节点查找父节点
|
||||
|
Reference in New Issue
Block a user