mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
add test
This commit is contained in:
parent
fc96980b68
commit
30eec7a74d
@ -263,4 +263,12 @@ public class JSONArrayTest {
|
|||||||
final String s = json1.toJSONString(0, (pair) -> false == pair.getValue().equals("value2"));
|
final String s = json1.toJSONString(0, (pair) -> false == pair.getValue().equals("value2"));
|
||||||
Assert.assertEquals("[\"value1\",\"value3\",true]", s);
|
Assert.assertEquals("[\"value1\",\"value3\",true]", s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void putNullTest(){
|
||||||
|
final JSONArray array = JSONUtil.createArray(JSONConfig.create().setIgnoreNullValue(false));
|
||||||
|
array.set(null);
|
||||||
|
|
||||||
|
Assert.assertEquals("[null]", array.toString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user