View Javadoc
1   /*
2    * Copyright 2022 The OSHI Project Contributors
3    * SPDX-License-Identifier: MIT
4    */
5   package oshi.driver.mac.net;
6   
7   import static org.hamcrest.MatcherAssert.assertThat;
8   import static org.hamcrest.Matchers.anEmptyMap;
9   import static org.hamcrest.Matchers.is;
10  import static org.hamcrest.Matchers.not;
11  
12  import org.junit.jupiter.api.Test;
13  import org.junit.jupiter.api.condition.EnabledOnOs;
14  import org.junit.jupiter.api.condition.OS;
15  
16  @EnabledOnOs(OS.MAC)
17  class NetstatTest {
18      @Test
19      void testQueryIfData() {
20          assertThat("IfData map should not be empty.", NetStat.queryIFdata(-1), is(not(anEmptyMap())));
21      }
22  }