mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
fix test
This commit is contained in:
parent
dbcca73dc2
commit
30e73d4b5a
@ -2,6 +2,7 @@ package cn.hutool.core.lang;
|
|||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.lang.tree.*;
|
import cn.hutool.core.lang.tree.*;
|
||||||
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -31,7 +32,7 @@ public class TreeTest {
|
|||||||
public void sampleTree() {
|
public void sampleTree() {
|
||||||
List<Tree<String>> treeNodes = TreeUtil.build(nodeList, "0");
|
List<Tree<String>> treeNodes = TreeUtil.build(nodeList, "0");
|
||||||
for (Tree<String> tree : treeNodes) {
|
for (Tree<String> tree : treeNodes) {
|
||||||
Console.log(tree);
|
Assert.assertNotNull(tree);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,6 +57,7 @@ public class TreeTest {
|
|||||||
tree.putExtra("extraField", 666);
|
tree.putExtra("extraField", 666);
|
||||||
tree.putExtra("other", new Object());
|
tree.putExtra("other", new Object());
|
||||||
});
|
});
|
||||||
System.out.println(treeNodes);
|
|
||||||
|
Assert.assertEquals(treeNodes.size(), 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user