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