JNI: call WolfSSL.loadLibrary() in WolfSSLContextTest and WolfSSLSessionTest in @BeforeClass so tests can run independently
parent
7da3a34dd7
commit
5f8e2f55f4
|
@ -22,6 +22,7 @@
|
|||
package com.wolfssl.test;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
import static org.junit.Assert.*;
|
||||
|
@ -48,6 +49,15 @@ public class WolfSSLContextTest {
|
|||
|
||||
WolfSSLContext ctx;
|
||||
|
||||
@BeforeClass
|
||||
public static void loadLibrary() {
|
||||
try {
|
||||
WolfSSL.loadLibrary();
|
||||
} catch (UnsatisfiedLinkError ule) {
|
||||
fail("failed to load native JNI library");
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testWolfSSLContext() throws WolfSSLException {
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
package com.wolfssl.test;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
import static org.junit.Assert.*;
|
||||
|
@ -55,6 +56,15 @@ public class WolfSSLSessionTest {
|
|||
WolfSSLContext ctx;
|
||||
WolfSSLSession ssl;
|
||||
|
||||
@BeforeClass
|
||||
public static void loadLibrary() {
|
||||
try {
|
||||
WolfSSL.loadLibrary();
|
||||
} catch (UnsatisfiedLinkError ule) {
|
||||
fail("failed to load native JNI library");
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testWolfSSLSession() throws WolfSSLException {
|
||||
|
||||
|
|
Loading…
Reference in New Issue