Hi,

I wrote a JUnit test and I am using eclipse but it won't run at all. This is what it keeps giving me in errors:

Class not found com.sqc.Testers.GenesisAdapterTester
java.lang.ClassNotFoundException: com.sqc.Testers.GenesisAdapterTester
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClass(RemoteTestRunner.java:693 )
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClasses(RemoteTestRunner.java:4 29)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:452)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)


This is my class:

package com.sqc.Testers;
import junit.framework.*;

public class GenesisAdapterTester extends TestCase {

private java.util.List emptyList;

protected void setUp() {
emptyList = new java.util.ArrayList();
}

protected void tearDown() {
emptyList = null;
}

public void testSomeBehavior() {
assertEquals("Empty list should have 0 elements", 0, emptyList.size());
}

public void testForException() {
try {
Object o = emptyList.get(0);
fail("Should raise an IndexOutOfBoundsException");
}
catch (IndexOutOfBoundsException success) {
}
}

public static Test suite() {
System.out.println("hello");
return new TestSuite( GenesisAdapterTester.class );
}
}


It doesn't even print out the "hello" in Test Suite so it seems like that function isn't even used. Does anyone have any suggestions on what is wrong? I already have JUnit Library (with the junit.jar file) added to the build path. I even tried both Junit 3 and JUnit 4. Any hints on how to fix this would be really appreciated!!