public static synchronized void load() { if (instance == null) { instance = new SQLiteLibraryLoader(); } instance.doLoad(); }
@Before public void setUp() { loader = new SQLiteLibraryLoader(); }
@Test(expected = UnsupportedOperationException.class) public void shouldThrowExceptionIfUnknownNameAndArch() throws Exception { loadLibrary(new SQLiteLibraryLoader(LINUX), "ACME Electronic", "FooBar2000"); }
@Test public void shouldFindLibraryForLinuxi386() throws IOException { assertThat(loadLibrary(new SQLiteLibraryLoader(LINUX), "Some linux version", "i386")) .isEqualTo("linux-x86/libsqlite4java.so"); }
@Test public void shouldFindLibraryForWindows7Amd64() throws IOException { assertThat(loadLibrary(new SQLiteLibraryLoader(WINDOWS), "Windows 7", "amd64")) .isEqualTo("windows-x86_64/sqlite4java.dll"); }
@Test public void shouldFindLibraryForMacWithAnyArchAndDyLibMapping() throws IOException { assertThat(loadLibrary(new SQLiteLibraryLoader(MAC_DYLIB), "Mac OS X", "any architecture")) .isEqualTo("mac-x86_64/libsqlite4java.jnilib"); }
@Test public void shouldFindLibraryForWindowsXPX86() throws IOException { assertThat(loadLibrary(new SQLiteLibraryLoader(WINDOWS), "Windows XP", "x86")) .isEqualTo("windows-x86/sqlite4java.dll"); }
@Test public void shouldFindLibraryForLinuxx86() throws IOException { assertThat(loadLibrary(new SQLiteLibraryLoader(LINUX), "Some linux version", "x86")) .isEqualTo("linux-x86/libsqlite4java.so"); }
@Test public void shouldFindLibraryForWindows7X86() throws IOException { assertThat(loadLibrary(new SQLiteLibraryLoader(WINDOWS), "Windows 7", "x86")) .isEqualTo("windows-x86/sqlite4java.dll"); }
@Test public void shouldFindLibraryForWindowsXPAmd64() throws IOException { assertThat(loadLibrary(new SQLiteLibraryLoader(WINDOWS), "Windows XP", "amd64")) .isEqualTo("windows-x86_64/sqlite4java.dll"); }
@Test public void shouldFindLibraryForLinuxAmd64() throws IOException { assertThat(loadLibrary(new SQLiteLibraryLoader(LINUX), "Some linux version", "amd64")) .isEqualTo("linux-x86_64/libsqlite4java.so"); }
@Test public void shouldFindLibraryForMacWithAnyArch() throws IOException { assertThat(loadLibrary(new SQLiteLibraryLoader(MAC), "Mac OS X", "any architecture")) .isEqualTo("mac-x86_64/libsqlite4java.jnilib"); }
public static synchronized void load() { if (instance == null) { instance = new SQLiteLibraryLoader(); } instance.doLoad(); }
public static synchronized void load() { if (instance == null) { instance = new SQLiteLibraryLoader(); } instance.doLoad(); }
public static synchronized void load() { if (instance == null) { instance = new SQLiteLibraryLoader(); } instance.doLoad(); }
public static synchronized void load() { if (instance == null) { instance = new SQLiteLibraryLoader(); } instance.doLoad(); }