mirror of
https://gitee.com/dromara/hutool.git
synced 2025-04-05 17:37:59 +08:00
add test
This commit is contained in:
parent
308fa0f9db
commit
7f83e35307
@ -154,4 +154,11 @@ public class JSONUtilTest {
|
||||
Assert.assertEquals("aa", json.get("name"));
|
||||
Assert.assertEquals(1, json.get("gender"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void doubleTest(){
|
||||
String json = "{\"test\": 12.00}";
|
||||
final JSONObject jsonObject = JSONUtil.parseObj(json);
|
||||
Assert.assertEquals("12.00", jsonObject.getBigDecimal("test").setScale(2).toString());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user