I'm following the example here: jMock - getting started
I'm getting this error: The type junit.framework.TestCase cannot be resolved. It is indirectly referenced from required .class files
I've imported these 4 jars:
Ant ideas of what this error means?
package com.test;
import org.jmock.integration.junit3.MockObjectTestCase;
import org.jmock.Expectations;
class PublisherTest extends MockObjectTestCase {
public void testOneSubscriberReceivesAMessage() {
// set up
final Subscriber subscriber = mock(Subscriber.class);
Publisher publisher = new Publisher();
publisher.add(subscriber);
final String message = "message";
// expectations
checking(new Expectations() {
{
oneOf(subscriber).receive(message);
}
});
// execute
publisher.publish(message);
}
}
Add JUnit 3 to your classpath.