mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
add test
This commit is contained in:
24
hutool-json/src/test/java/cn/hutool/json/Issue2564Test.java
Executable file
24
hutool-json/src/test/java/cn/hutool/json/Issue2564Test.java
Executable file
@@ -0,0 +1,24 @@
|
||||
package cn.hutool.json;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
public class Issue2564Test {
|
||||
|
||||
/**
|
||||
* 实力类 没有get set方法,不能被认为是一个bean
|
||||
*/
|
||||
@Test()
|
||||
public void emptyToBeanTest(){
|
||||
final String x = "{}";
|
||||
final A a = JSONUtil.toBean(x, JSONConfig.of().setIgnoreError(true), A.class);
|
||||
Assert.assertNull(a);
|
||||
}
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public static class A{
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user