mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
add test
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
package cn.hutool.extra.management;
|
package cn.hutool.extra.management;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.SystemUtil;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Ignore;
|
import org.junit.Ignore;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
@@ -50,4 +51,12 @@ public class SystemUtilTest {
|
|||||||
final UserInfo userInfo = ManagementUtil.getUserInfo();
|
final UserInfo userInfo = ManagementUtil.getUserInfo();
|
||||||
Assert.assertTrue(userInfo.getTempDir().endsWith(File.separator));
|
Assert.assertTrue(userInfo.getTempDir().endsWith(File.separator));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void getOsVersionTest(){
|
||||||
|
String s = SystemUtil.get("os.name");
|
||||||
|
Assert.assertNotNull(s);
|
||||||
|
s = SystemUtil.get("os.version");
|
||||||
|
Assert.assertNotNull(s);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user