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); } } }