Do what you think is interesting, do something that you think is fun and worthwhile, because otherwise you won't do it well anyway.
                                - Brian Kernighan
 
Поиск
Поиск

 
 
Меню навигации
Меню навигации
 
 
Проекты
Проекты
 
 
 
 
Size_box_tl   Size_box_tr
 
Unfortunately, there is no translation for this page. We have redirected you to the english version of the site. We are sorry for any inconvenience caused...

JUnit problem - java.lang.NoSuchMethodError: junit.framework.TestCase.getName()Ljava/lang/String;

 

Recently I switched to Junit 4.6 and started noticing the following error JUnit problem - java.lang.NoSuchMethodError: junit.framework.TestCase.getName()Ljava/lang/String; when JUnit tries to assert strings.

After looking at it more closely and googling a little I have found the cause of the problem. I am using dbUnit which in its own respect is dependant on JUnit and its dependency was lower version of JUnit that I was using which caused the above error.

In order to fix this issue you need to open build path and reaarange the jar depencies order to that JUnit jar is above all other jars like so:

Eclipse JUnit multi dependency problem

After doing so the assertion should work normally.

Enjoy :-)

Эта страница была обновлена: 15/02/2010 09:28


© Inspire Software, Denys Pavlov, 2005-2012
© Inspire Software, Denys Pavlov, 2005-2012
 
Size_box_bl   Size_box_br