View Javadoc
1   /*
2    * Copyright 2016-2022 The OSHI Project Contributors
3    * SPDX-License-Identifier: MIT
4    */
5   package oshi.hardware;
6   
7   import static org.hamcrest.MatcherAssert.assertThat;
8   import static org.hamcrest.Matchers.greaterThanOrEqualTo;
9   import static org.hamcrest.Matchers.is;
10  
11  import java.util.List;
12  
13  import org.junit.jupiter.api.Test;
14  
15  import oshi.SystemInfo;
16  
17  /**
18   * Tests Displays
19   */
20  class DisplayTest {
21  
22      /**
23       * Test displays
24       */
25      @Test
26      void testDisplay() {
27          SystemInfo si = new SystemInfo();
28          List<Display> displays = si.getHardware().getDisplays();
29          for (Display d : displays) {
30              assertThat("EDID Byte length should be at least 128", d.getEdid().length, is(greaterThanOrEqualTo(128)));
31          }
32      }
33  }