FileDocCategorySizeDatePackage
NativeLibraryFinderTest.javaAPI DocFobs4JMF API 0.4.1846Tue Dec 19 14:58:24 GMT 2006com.moesol.bindings

NativeLibraryFinderTest

public class NativeLibraryFinderTest extends TestCase

Fields Summary
Constructors Summary
Methods Summary
public voidtestFailedFind()
Not much of a test, but does log all the different combinations that are tried, and checks that we end up throwing the original exception if all fail.

		Logger l = Logger.getLogger("");
		Level oldLevel = l.getLevel();
		l.setLevel(Level.FINE);
		try {
			Logger.getLogger("").getHandlers()[0].setLevel(Level.ALL);
			NativeLibraryFinder nf = new NativeLibraryFinder();
			try {
				nf.loadLibrary(getClass(), "foo");
			} catch (UnsatisfiedLinkError e) {
				assertEquals("no foo in java.library.path", e.getMessage());
			}
		} finally {
			l.setLevel(oldLevel);
		}