mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix bugs
This commit is contained in:
15
hutool-json/src/test/java/cn/hutool/json/XMLTest.java
Normal file
15
hutool-json/src/test/java/cn/hutool/json/XMLTest.java
Normal file
@@ -0,0 +1,15 @@
|
||||
package cn.hutool.json;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
public class XMLTest {
|
||||
|
||||
@SuppressWarnings("ConstantConditions")
|
||||
@Test
|
||||
public void toXmlTest(){
|
||||
final JSONObject put = JSONUtil.createObj().put("aaa", "你好").put("键2", "test");
|
||||
final String s = JSONUtil.toXmlStr(put);
|
||||
Assert.assertEquals("<aaa>你好</aaa><键2>test</键2>", s);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user