Skip to content

Commit 4ed39fc

Browse files
committed
3.2.126
1 parent afa9f8b commit 4ed39fc

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

snack3_demo/src/test/java/features/DateTest.java

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
import java.time.*;
1111
import java.util.Date;
12+
import java.util.HashMap;
13+
import java.util.Map;
1214

1315
/**
1416
* @author noear 2021/6/13 created
@@ -105,7 +107,17 @@ public void test6() throws Exception {
105107
@Test
106108
public void test7() throws Exception {
107109
Date date = new java.sql.Date(DateUtil.parse(LocalDate.now().toString()).getTime());
108-
LocalDate day = ONode.load(date).toObject(LocalDate.class);
109-
System.out.println(day.toString());
110+
Map map = new HashMap();
111+
map.put("date", date);
112+
System.out.println(date);
113+
114+
DateMapModel model = ONode.load(map).toObject(DateMapModel.class);
115+
System.out.println(model.date.toString());
116+
117+
assert date.toString().equals(model.date.toString());
118+
}
119+
120+
public static class DateMapModel {
121+
public LocalDate date;
110122
}
111123
}

0 commit comments

Comments
 (0)