changed test case to convert . to / when doing class name searches. This test now passes in my environment.

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

View File

@ -18,6 +18,7 @@ package org.apache.openjpa.util;
import junit.framework.TestCase; import junit.framework.TestCase;
import org.apache.openjpa.util.WASTransformer; import org.apache.openjpa.util.WASTransformer;
import serp.util.Strings;
/** /**
* Test class for WASTransformer. * Test class for WASTransformer.
@ -35,7 +36,7 @@ public class TestWASTransformer extends TestCase {
* @throws ClassNotFoundException * @throws ClassNotFoundException
* @author Michael Dick * @author Michael Dick
*/ */
public void testInterfaceAdded()throws ClassNotFoundException { public void testInterfaceAdded() throws ClassNotFoundException {
String msg = null; String msg = null;
@ -45,8 +46,10 @@ public class TestWASTransformer extends TestCase {
} catch (NoClassDefFoundError e) { } catch (NoClassDefFoundError e) {
msg = e.getMessage(); msg = e.getMessage();
} }
assertTrue("message should have contained WASTransformer._interface, " String translatedInterface = Strings.replace(
+ " but was '" + msg + "'", WASTransformer._interface, ".", "/");
msg.contains(WASTransformer._interface)); assertTrue("message should have contained "
+ translatedInterface + ", but was '" + msg + "'",
msg.contains(translatedInterface));
} }
} }