mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
change line sep
This commit is contained in:
@@ -1,21 +1,21 @@
|
||||
package cn.hutool.system;
|
||||
|
||||
import cn.hutool.system.oshi.CpuInfo;
|
||||
import cn.hutool.system.oshi.OshiUtil;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
public class OshiTest {
|
||||
|
||||
@Test
|
||||
public void getMemeryTest() {
|
||||
long total = OshiUtil.getMemory().getTotal();
|
||||
Assert.assertTrue(total > 0);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getCupInfo() {
|
||||
CpuInfo cpuInfo = OshiUtil.getCpuInfo();
|
||||
Assert.assertNotNull(cpuInfo);
|
||||
}
|
||||
}
|
||||
package cn.hutool.system;
|
||||
|
||||
import cn.hutool.system.oshi.CpuInfo;
|
||||
import cn.hutool.system.oshi.OshiUtil;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
public class OshiTest {
|
||||
|
||||
@Test
|
||||
public void getMemeryTest() {
|
||||
long total = OshiUtil.getMemory().getTotal();
|
||||
Assert.assertTrue(total > 0);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getCupInfo() {
|
||||
CpuInfo cpuInfo = OshiUtil.getCpuInfo();
|
||||
Assert.assertNotNull(cpuInfo);
|
||||
}
|
||||
}
|
||||
|
@@ -1,39 +1,39 @@
|
||||
package cn.hutool.system;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
public class SystemUtilTest {
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void dumpTest() {
|
||||
SystemUtil.dumpSystemInfo();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getCurrentPidTest() {
|
||||
long pid = SystemUtil.getCurrentPID();
|
||||
Assert.assertTrue(pid > 0);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getJavaInfoTest() {
|
||||
JavaInfo javaInfo = SystemUtil.getJavaInfo();
|
||||
Assert.assertNotNull(javaInfo);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getOsInfoTest() {
|
||||
OsInfo osInfo = SystemUtil.getOsInfo();
|
||||
Assert.assertNotNull(osInfo);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getHostInfo() {
|
||||
HostInfo hostInfo = SystemUtil.getHostInfo();
|
||||
Assert.assertNotNull(hostInfo);
|
||||
}
|
||||
|
||||
}
|
||||
package cn.hutool.system;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
public class SystemUtilTest {
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void dumpTest() {
|
||||
SystemUtil.dumpSystemInfo();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getCurrentPidTest() {
|
||||
long pid = SystemUtil.getCurrentPID();
|
||||
Assert.assertTrue(pid > 0);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getJavaInfoTest() {
|
||||
JavaInfo javaInfo = SystemUtil.getJavaInfo();
|
||||
Assert.assertNotNull(javaInfo);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getOsInfoTest() {
|
||||
OsInfo osInfo = SystemUtil.getOsInfo();
|
||||
Assert.assertNotNull(osInfo);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getHostInfo() {
|
||||
HostInfo hostInfo = SystemUtil.getHostInfo();
|
||||
Assert.assertNotNull(hostInfo);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user