mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
add test
This commit is contained in:
parent
050021912b
commit
701120b169
@ -0,0 +1,25 @@
|
||||
package org.dromara.hutool.json;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class IssueI8NMP7Test {
|
||||
|
||||
@Test
|
||||
public void toBeanTest() {
|
||||
final String jsonString = "{\"enableTime\":\"1702262524444\"}";
|
||||
final DemoModel bean = JSONUtil.toBean(jsonString, JSONConfig.of().setDateFormat("#SSS"), DemoModel.class);
|
||||
Assertions.assertNotNull(bean.getEnableTime());
|
||||
}
|
||||
|
||||
@Data
|
||||
@ToString
|
||||
static class DemoModel{
|
||||
private Date enableTime;
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user