mirror of
https://gitee.com/dromara/hutool.git
synced 2025-04-05 17:37:59 +08:00
fix tst
This commit is contained in:
parent
f8017c31d5
commit
32e0d57ff6
@ -1,5 +1,6 @@
|
||||
package cn.hutool.json;
|
||||
|
||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||
import lombok.Data;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
@ -19,10 +20,12 @@ public class Issue644Test {
|
||||
final JSONObject jsonObject = JSONUtil.parseObj(beanWithDate);
|
||||
|
||||
BeanWithDate beanWithDate2 = JSONUtil.toBean(jsonObject, BeanWithDate.class);
|
||||
Assert.assertEquals(beanWithDate.getDate(), beanWithDate2.getDate());
|
||||
Assert.assertEquals(LocalDateTimeUtil.formatNormal(beanWithDate.getDate()),
|
||||
LocalDateTimeUtil.formatNormal(beanWithDate2.getDate()));
|
||||
|
||||
beanWithDate2 = JSONUtil.toBean(jsonObject.toString(), BeanWithDate.class);
|
||||
Assert.assertEquals(beanWithDate.getDate(), beanWithDate2.getDate());
|
||||
Assert.assertEquals(LocalDateTimeUtil.formatNormal(beanWithDate.getDate()),
|
||||
LocalDateTimeUtil.formatNormal(beanWithDate2.getDate()));
|
||||
}
|
||||
|
||||
@Data
|
||||
|
Loading…
Reference in New Issue
Block a user