mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -2,6 +2,7 @@ package cn.hutool.core.bean;
|
||||
|
||||
import cn.hutool.core.lang.test.bean.ExamInfoDict;
|
||||
import cn.hutool.core.lang.test.bean.UserInfoDict;
|
||||
import cn.hutool.core.map.Dict;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
@@ -144,4 +145,11 @@ public class BeanPathTest {
|
||||
beanPath.set(map, "张三");
|
||||
Assert.assertEquals("{list=[[null, {name=张三}]]}", map.toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void putByPathTest() {
|
||||
final Dict dict = new Dict();
|
||||
BeanPath.of("aa.bb").set(dict, "BB");
|
||||
Assert.assertEquals("{aa={bb=BB}}", dict.toString());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user