View Javadoc
1   /*
2    * Copyright 2021-2022 The OSHI Project Contributors
3    * SPDX-License-Identifier: MIT
4    */
5   package oshi.driver.linux;
6   
7   import static org.hamcrest.MatcherAssert.assertThat;
8   import static org.hamcrest.Matchers.matchesRegex;
9   import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
10  
11  import org.junit.jupiter.api.Test;
12  
13  import oshi.TestConstants;
14  
15  class LshalTest {
16  
17      @Test
18      void testQueries() {
19          assertDoesNotThrow(Lshal::querySerialNumber);
20  
21          final String uuid = Lshal.queryUUID();
22          if (uuid != null) {
23              assertThat("Test Lshal queryUUID format", uuid, matchesRegex(TestConstants.UUID_REGEX));
24          }
25      }
26  
27  }