()
| 321 | |
| 322 | // serializeToJSONString |
| 323 | @Test |
| 324 | public void serializeToJSONString() throws Exception { |
| 325 | HashMap<String, String> map = new HashMap<String, String>(); |
| 326 | map.put("utf", "aériennes"); |
| 327 | map.put("ascii", "aariennes"); |
| 328 | String json = JSON.serializeToJSONPString("dummycb", map); |
| 329 | assertNotNull(json); |
| 330 | assertFalse(json.isEmpty()); |
| 331 | assertTrue(json.matches("dummycb\\(.*[{,]\"ascii\":\"aariennes\"[,}].*\\)")); |
| 332 | } |
| 333 | |
| 334 | @Test (expected = IllegalArgumentException.class) |
| 335 | public void serializeToJSONStringNullData() throws Exception { |
nothing calls this directly
no test coverage detected