yangys
2025-05-26 2ba2c339acf41fd7bb2a49f0ce186fd664a80cb5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package com.qianwen.license.common;
import static org.junit.jupiter.api.Assertions.assertNotNull;
 
import org.junit.jupiter.api.Test;
 
public class WindowsServerInfosTest {
    static final String OS = System.getProperty("os.name");
    @Test
    public void getCPUSerial() throws Exception {
        System.out.println("OS="+OS);
        
        if (OS.contains("Windows")) {
            WindowsServerInfos si = new WindowsServerInfos();
            
            String r = si.getCPUSerial();
            System.out.println("CPU="+r);
            assertNotNull(r);
        }
    }
    @Test
    public void getMainBoardSerial() throws Exception {
        WindowsServerInfos si = new WindowsServerInfos();
        if (OS.contains("Windows")) {
            String r = si.getMainBoardSerial();
            System.out.println("BOARD="+r);
            assertNotNull(r);
        }
    }
    
}