在单元测试中不使用hutool的断言

This commit is contained in:
王良
2022-01-06 10:23:03 +08:00
parent 84345df17f
commit dcf8049317
3 changed files with 7 additions and 7 deletions

View File

@@ -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);
});
}

View File

@@ -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));
}
}