From 4552fa27c63d4033b8eb807ab9bf7d055bd6ac91 Mon Sep 17 00:00:00 2001 From: Looly Date: Sun, 10 Oct 2021 14:15:55 +0800 Subject: [PATCH] fix test --- .../src/test/java/cn/hutool/core/text/StrJoinerTest.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hutool-core/src/test/java/cn/hutool/core/text/StrJoinerTest.java b/hutool-core/src/test/java/cn/hutool/core/text/StrJoinerTest.java index 6da47a54a..2ce2eee8c 100644 --- a/hutool-core/src/test/java/cn/hutool/core/text/StrJoinerTest.java +++ b/hutool-core/src/test/java/cn/hutool/core/text/StrJoinerTest.java @@ -4,7 +4,6 @@ import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.ListUtil; import org.junit.Assert; import org.junit.Test; -import org.hamcrest.CoreMatchers; import java.util.ArrayList; import java.util.List; @@ -35,9 +34,9 @@ public class StrJoinerTest { public void joinMultiArrayTest(){ final StrJoiner append = StrJoiner.of(","); append.append(new Object[]{ListUtil.of("1", "2"), - CollUtil.newHashSet("3", "4") + CollUtil.newLinkedHashSet("3", "4") }); - Assert.assertThat(append.toString(), CoreMatchers.anyOf(CoreMatchers.is("1,2,3,4"), CoreMatchers.is("1,2,4,3"))); + Assert.assertEquals("1,2,3,4", append.toString()); } @Test