mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
gts
This commit is contained in:
parent
6d91319391
commit
8bfce0e26e
@ -0,0 +1,19 @@
|
||||
package org.dromara.hutool.json.issues;
|
||||
|
||||
import org.dromara.hutool.core.reflect.TypeReference;
|
||||
import org.dromara.hutool.json.JSONException;
|
||||
import org.dromara.hutool.json.JSONUtil;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class Issue3795Test {
|
||||
@Test
|
||||
void toBeanTest() {
|
||||
final String fieldMapping = "[{\"lable\":\"id\",\"value\":\"id\"},{\"lable\":\"name\",\"value\":\"name\"},{\"lable\":\"age\",\"value\":\"age\"}]";
|
||||
Assertions.assertThrows(JSONException.class, ()->{
|
||||
JSONUtil.toBean(fieldMapping, new TypeReference<Map<String, String>>() {});
|
||||
});
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user