Hi all,
I have a small code using JUnit 4.4. I get the following error when I run the code. Any idea? Any help is greatly appreciated.
java.lang.SecurityException: class "junit.framework.JUnit4TestAdapter"'s signer information does not match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(Unknown Source)
at java.lang.ClassLoader.preDefineClass(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
My code:
import static org.junit.Assert.assertTrue;
import junit.framework.JUnit4TestAdapter;
import org.junit.Before;
import org.junit.Test;
public class MyClass {
private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(MyClass.class);
@Before
public void setUp() throws Exception {
System.setProperty("FILENAME", qUnitTestConstants.EnvFile);
}
@Test public void success(){
String name = "name";
assertTrue(name.equals("name"));
}
public static junit.framework.Test suite() {
return new JUnit4TestAdapter(MyClass.class);
}
}