This commit is contained in:
Looly
2022-03-28 13:49:33 +08:00
parent f69d49593b
commit 78f5e94652
7 changed files with 39 additions and 20 deletions

View File

@@ -1,6 +1,7 @@
package cn.hutool.json.test.bean;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.HashMap;
import java.util.Map;
@@ -10,6 +11,7 @@ import java.util.Map;
* @version 创建时间2017年9月13日 下午5:16:32
* 类说明
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class PerfectEvaluationProductResVo extends ProductResBase {
private static final long serialVersionUID = 1L;

View File

@@ -3,9 +3,10 @@ package cn.hutool.json.xml;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import cn.hutool.json.XML;
import org.hamcrest.CoreMatchers;
import org.hamcrest.MatcherAssert;
import org.junit.Assert;
import org.junit.Test;
import org.hamcrest.CoreMatchers;
public class XMLTest {
@@ -15,7 +16,7 @@ public class XMLTest {
.set("aaa", "你好")
.set("键2", "test");
final String s = JSONUtil.toXmlStr(put);
Assert.assertThat(s, CoreMatchers.anyOf(CoreMatchers.is("<aaa>你好</aaa><键2>test</键2>"), CoreMatchers.is("<键2>test</键2><aaa>你好</aaa>")));
MatcherAssert.assertThat(s, CoreMatchers.anyOf(CoreMatchers.is("<aaa>你好</aaa><键2>test</键2>"), CoreMatchers.is("<键2>test</键2><aaa>你好</aaa>")));
}
@Test