mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
在单元测试中不使用hutool的断言
This commit is contained in:
parent
84345df17f
commit
dcf8049317
@ -1,7 +1,7 @@
|
|||||||
package cn.hutool.core.collection;
|
package cn.hutool.core.collection;
|
||||||
|
|
||||||
import cn.hutool.core.lang.Assert;
|
|
||||||
import cn.hutool.core.thread.ThreadUtil;
|
import cn.hutool.core.thread.ThreadUtil;
|
||||||
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@ -27,7 +27,7 @@ public class RingIndexUtilTest {
|
|||||||
ThreadUtil.concurrencyTest(strList.size(), () -> {
|
ThreadUtil.concurrencyTest(strList.size(), () -> {
|
||||||
final int index = RingIndexUtil.ringNextIntByObj(strList, atomicInteger);
|
final int index = RingIndexUtil.ringNextIntByObj(strList, atomicInteger);
|
||||||
final String s = strList.get(index);
|
final String s = strList.get(index);
|
||||||
Assert.notNull(s);
|
Assert.assertNotNull(s);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package cn.hutool.core.thread;
|
package cn.hutool.core.thread;
|
||||||
|
|
||||||
import cn.hutool.core.lang.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Ignore;
|
import org.junit.Ignore;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
@ -33,6 +33,6 @@ public class AsyncUtilTest {
|
|||||||
// 等待完成
|
// 等待完成
|
||||||
AsyncUtil.waitAll(hutool, sweater, warm);
|
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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package cn.hutool.crypto.test;
|
package cn.hutool.crypto.test;
|
||||||
|
|
||||||
import cn.hutool.core.lang.Assert;
|
|
||||||
import cn.hutool.crypto.BCUtil;
|
import cn.hutool.crypto.BCUtil;
|
||||||
import org.bouncycastle.crypto.params.ECPrivateKeyParameters;
|
import org.bouncycastle.crypto.params.ECPrivateKeyParameters;
|
||||||
import org.bouncycastle.crypto.params.ECPublicKeyParameters;
|
import org.bouncycastle.crypto.params.ECPublicKeyParameters;
|
||||||
|
import org.junit.Assert;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
public class BCUtilTest {
|
public class BCUtilTest {
|
||||||
@ -17,7 +17,7 @@ public class BCUtilTest {
|
|||||||
String y = "F7E938B02EED7280277493B8556E5B01CB436E018A562DFDC53342BF41FDF728";
|
String y = "F7E938B02EED7280277493B8556E5B01CB436E018A562DFDC53342BF41FDF728";
|
||||||
|
|
||||||
final ECPublicKeyParameters keyParameters = BCUtil.toSm2Params(x, y);
|
final ECPublicKeyParameters keyParameters = BCUtil.toSm2Params(x, y);
|
||||||
Assert.notNull(keyParameters);
|
Assert.assertNotNull(keyParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -25,6 +25,6 @@ public class BCUtilTest {
|
|||||||
String privateKeyHex = "5F6CA5BB044C40ED2355F0372BF72A5B3AE6943712F9FDB7C1FFBAECC06F3829";
|
String privateKeyHex = "5F6CA5BB044C40ED2355F0372BF72A5B3AE6943712F9FDB7C1FFBAECC06F3829";
|
||||||
|
|
||||||
final ECPrivateKeyParameters keyParameters = BCUtil.toSm2Params(privateKeyHex);
|
final ECPrivateKeyParameters keyParameters = BCUtil.toSm2Params(privateKeyHex);
|
||||||
Assert.notNull(keyParameters);
|
Assert.assertNotNull(keyParameters);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user