Is your JUnit Assert class now deprecated?

Is your JUnit Assert class now deprecated? Well here’s how to fix it. JUnit have moved things around, and as a result the Assert class is now in a different location as and from JUnit 4.11

But fear not, rectifying this is a simple one-liner. Simply change your import statement from

import junit.framework.Assert; 
to this:
 import org.junit.Assert; 

Simples!

Leave a Comment