Skip to content
Snippets Groups Projects
Commit a838a706 authored by akwizgran's avatar akwizgran
Browse files

Add test for loading resources.

parent 42a014f3
No related branches found
No related tags found
No related merge requests found
package org.briarproject.onionwrapper;
import org.junit.Before;
import org.junit.Test;
import static org.briarproject.onionwrapper.TestUtils.isLinux;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assume.assumeTrue;
public class ResourcesTest {
@Before
public void setUp() {
assumeTrue(isLinux());
}
@Test
public void testCanLoadTor() {
testCanLoadResource("x86_64/tor");
}
@Test
public void testCanLoadObfs4() {
testCanLoadResource("x86_64/obfs4proxy");
}
@Test
public void testCanLoadSnowflake() {
testCanLoadResource("x86_64/snowflake");
}
private void testCanLoadResource(String name) {
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
assertNotNull(classLoader.getResourceAsStream(name));
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment