added Windows 10 support
This commit is contained in:
@ -23,17 +23,18 @@ public class OSUtilTest {
|
|||||||
public void testGetOS() {
|
public void testGetOS() {
|
||||||
String osName = getProperties().getProperty("os.name").toUpperCase();
|
String osName = getProperties().getProperty("os.name").toUpperCase();
|
||||||
int os = getOperationSystem();
|
int os = getOperationSystem();
|
||||||
|
|
||||||
switch (osName) {
|
switch (osName) {
|
||||||
case "LINUX":
|
case "LINUX":
|
||||||
assertTrue(os == OSUtil.OS_LINUX);
|
assertTrue(os == OSUtil.OS_LINUX);
|
||||||
break;
|
break;
|
||||||
case "WINDOWS":
|
case "WINDOWS":
|
||||||
case "WINDOWS 7":
|
case "WINDOWS 7":
|
||||||
|
case "WINDOWS 10":
|
||||||
assertTrue(os == OSUtil.OS_WINDOWS);
|
assertTrue(os == OSUtil.OS_WINDOWS);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
fail("Unknown / unsupported OS for test case");
|
fail("Unknown / unsupported OS " + osName + " for test case");
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.println(osName);
|
System.out.println(osName);
|
||||||
|
|||||||
Reference in New Issue
Block a user