dcsimg
java.lang.NoSuchMethodError
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Monday, November 25, 2002 07:44 AM

Hi, I have the following problem: If a want to include a test with an Assert where both parameters are String: String expected = "hello"; Assert.assertEquals(expected,myObject.getHello()); I get always this error "java.lang.NoSuchMethodError" pointing to the assert line. Even something like this returns the same error: Assert.assertEquals("hello","hello"); It only happens with String. Does anybody know why? Thanks folks.    More>>

Hi,

I have the following problem:


If a want to include a test with an Assert where both parameters are String:

			
String expected = "hello";
Assert.assertEquals(expected,myObject.getHello());



I get always this error "java.lang.NoSuchMethodError" pointing to the assert line.


Even something like this returns the same error:

Assert.assertEquals("hello","hello");


It only happens with String. Does anybody know why?


Thanks folks.

   <<Less

Re: java.lang.NoSuchMethodError

Posted By:   Christopher_Schultz  
Posted On:   Monday, November 25, 2002 12:06 PM

The only thing I can think of is that you are using one version of JUnit to compile your app, and another version to run it.



-chris
About | Sitemap | Contact