"Assert in junit.framework has been deprecated" - what next to use?

gavenkoa picture gavenkoa · Jun 3, 2014 · Viewed 86.5k times · Source

I bump version of junit to 4.11 and get:

[WARNING] [deprecation] Assert in junit.framework has been deprecated
[WARNING] [deprecation] Assert in junit.framework has been deprecated
....

How and to what migrate?

Answer

Alex Stockinger picture Alex Stockinger · Jun 3, 2014

As it seems the Assert class has been moved from junit.framework to org.junit.Assert in JUnit 4.0 - you can use that instead, it's not deprecated.