changed test case to include more debug info in failures. This test case does not pass on my machine.

git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@468283 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Patrick Linskey 2006-10-27 05:41:03 +00:00
parent 27563987ef
commit ea81e82435
1 changed files with 7 additions and 9 deletions

View File

@ -37,18 +37,16 @@ public class TestWASTransformer extends TestCase {
*/
public void testInterfaceAdded()throws ClassNotFoundException {
boolean caughtExpectedException = false;
Class syncClass = null;
String msg = null;
try {
syncClass = Class.forName(WASTransformer._class);
Class.forName(WASTransformer._class);
fail("expected an exception to be thrown");
} catch (NoClassDefFoundError e) {
if (e.getMessage().contains(WASTransformer._interface)) {
caughtExpectedException = true;
msg = e.getMessage();
}
}
assertNull(syncClass);
assertTrue(caughtExpectedException);
assertTrue("message should have contained WASTransformer._interface, "
+ " but was '" + msg + "'",
msg.contains(WASTransformer._interface));
}
}