!699 ForestMap添加getNodeValue方法

Merge pull request !699 from Createsequence/feat-node-value
This commit is contained in:
Looly
2022-07-16 00:39:30 +00:00
committed by Gitee
2 changed files with 20 additions and 0 deletions

View File

@@ -142,6 +142,14 @@ public class LinkedForestMapTest {
Assert.assertFalse(c.hasChildren());
}
@Test
public void getNodeValueTest() {
final ForestMap<String, String> map = new LinkedForestMap<>(false);
map.putNode("a", "aaa");
Assert.assertEquals("aaa", map.getNodeValue("a"));
Assert.assertNull(map.getNodeValue("b"));
}
@Test
public void putAllNodeTest() {
final ForestMap<String, Map<String, String>> map = new LinkedForestMap<>(false);