mirror of
https://gitee.com/dromara/hutool.git
synced 2025-05-22 16:09:35 +08:00
Merge pull request #1874 from ZeyuCai/v5-dev
fix flaky test cn.hutool.json.xml.XMLTest#toXmlTest
This commit is contained in:
commit
738f6ce20a
@ -5,6 +5,7 @@ import cn.hutool.json.JSONUtil;
|
|||||||
import cn.hutool.json.XML;
|
import cn.hutool.json.XML;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
import org.hamcrest.CoreMatchers;
|
||||||
|
|
||||||
public class XMLTest {
|
public class XMLTest {
|
||||||
|
|
||||||
@ -14,7 +15,7 @@ public class XMLTest {
|
|||||||
.set("aaa", "你好")
|
.set("aaa", "你好")
|
||||||
.set("键2", "test");
|
.set("键2", "test");
|
||||||
final String s = JSONUtil.toXmlStr(put);
|
final String s = JSONUtil.toXmlStr(put);
|
||||||
Assert.assertEquals("<aaa>你好</aaa><键2>test</键2>", s);
|
Assert.assertThat(s, CoreMatchers.anyOf(CoreMatchers.is("<aaa>你好</aaa><键2>test</键2>"), CoreMatchers.is("<键2>test</键2><aaa>你好</aaa>")));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
Reference in New Issue
Block a user