This commit is contained in:
Looly
2022-06-10 12:21:56 +08:00
parent 64f801998b
commit c4ab3af0a3

View File

@@ -1,5 +1,6 @@
package cn.hutool.extra.management;
import cn.hutool.core.util.SystemUtil;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
@@ -50,4 +51,12 @@ public class SystemUtilTest {
final UserInfo userInfo = ManagementUtil.getUserInfo();
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);
}
}