1761727 converted unit test programs to JUnit tests and updated the build targets

This commit is contained in:
clay_shooter
2007-07-27 03:28:44 +00:00
parent bfdc36ad30
commit 78c7ddf199
71 changed files with 1459 additions and 1257 deletions

View File

@@ -1,29 +1,28 @@
package com.jacob.com;
/**
* Test armoring of dispatch static methods
* May need to run with some command line options (including from inside Eclipse).
* If so, then try these
* <pre>
* -Djava.library.path=d:/jacob/release/x86
* -Dcom.jacob.autogc=false
* -Dcom.jacob.debug=false
* -Xcheck:jni
* </pre>
*/
public class DispatchValidDispatchTest {
import com.jacob.test.BaseTestCase;
public static void main(String[] args)
{
/**
* Test armoring of dispatch static methods
* <p>
* May need to run with some command line options (including from inside Eclipse).
* Look in the docs area at the Jacob usage document for command line options.
*/
public class DispatchValidDispatchTest extends BaseTestCase {
public void testThrowIllegalArgumentException() {
try {
Dispatch.call(null, 0);
System.out.println("Failed to throw IllegalArgumentException");
fail("Failed to throw IllegalArgumentException");
} catch (IllegalArgumentException iae){
System.out.println("Caught correct IllegalArgumentException: "+iae);
}
}
public void testThrowIllegalStateException() {
try {
Dispatch foo = new Dispatch();
Dispatch.call(foo, 0);
fail("Failed to throw IllegalStateException");
} catch (IllegalStateException ise){
System.out.println("Caught correct IllegalStateException "+ise);
}