Skip to content

Commit 5b28085

Browse files
committed
Add JUnit test for loading the native library
1 parent 5078222 commit 5b28085

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import org.junit.jupiter.api.DisplayName;
2+
import org.junit.jupiter.api.Order;
3+
import org.junit.jupiter.api.Test;
4+
import org.junit.jupiter.api.condition.EnabledOnOs;
5+
import org.junit.jupiter.api.condition.OS;
6+
import org.slf4j.Logger;
7+
import org.slf4j.LoggerFactory;
8+
9+
import static org.junit.jupiter.api.Assertions.*;
10+
11+
class AppIndicatorTest {
12+
private static final Logger LOG = LoggerFactory.getLogger(AppIndicatorTest.class);
13+
@Test
14+
@Order(1)
15+
@DisplayName("Testing availability of native lib")
16+
@EnabledOnOs(OS.LINUX)
17+
public void shouldHaveNoErrors() {
18+
try {
19+
System.loadLibrary("appindicator3");
20+
} catch (UnsatisfiedLinkError e) {
21+
LOG.error("Native code library failed to load.\n", e);
22+
}
23+
}
24+
}

0 commit comments

Comments
 (0)