add junit test case #644 (#661)

pull/663/head
liutao 2 years ago committed by GitHub
parent 361019b68e
commit 0ca75f9706
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -17,5 +17,26 @@
package cn.hippo4j.common.toolkit;
import org.junit.Test;
import static org.junit.Assert.assertTrue;
public class ThreadUtilTest {
@Test
public void testNewThread() {
// Setup
final Runnable runnable = null;
// Run the test
final Thread result = ThreadUtil.newThread(runnable, "name", false);
// Verify the results
Assert.notNull(result);
}
@Test
public void testSleep() {
assertTrue(ThreadUtil.sleep(0L));
}
}

Loading…
Cancel
Save