mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
在单元测试中不使用hutool的断言
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package cn.hutool.core.collection;
|
||||
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import cn.hutool.core.thread.ThreadUtil;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.Arrays;
|
||||
@@ -27,7 +27,7 @@ public class RingIndexUtilTest {
|
||||
ThreadUtil.concurrencyTest(strList.size(), () -> {
|
||||
final int index = RingIndexUtil.ringNextIntByObj(strList, atomicInteger);
|
||||
final String s = strList.get(index);
|
||||
Assert.notNull(s);
|
||||
Assert.assertNotNull(s);
|
||||
});
|
||||
}
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
package cn.hutool.core.thread;
|
||||
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -33,6 +33,6 @@ public class AsyncUtilTest {
|
||||
// 等待完成
|
||||
AsyncUtil.waitAll(hutool, sweater, warm);
|
||||
// 获取结果
|
||||
Assert.isTrue("hutool卫衣真暖和".equals(AsyncUtil.get(hutool) + AsyncUtil.get(sweater) + AsyncUtil.get(warm)));
|
||||
Assert.assertEquals("hutool卫衣真暖和", AsyncUtil.get(hutool) + AsyncUtil.get(sweater) + AsyncUtil.get(warm));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user