The samples are not in junit-4.4.jar. They are in the Junit
installation folder. Try adding the installation folder to classpath
and see if it works..
-cheers,
Manish
Now I'm having trouble running my tests:
~/Development/jmms_service/bin/com/tm/Services/MMS eggie5$ java
org.junit.runner.JUnitCore ServiceTest
JUnit version 4.4
Exception in thread "main" java.lang.NoClassDefFoundError: ServiceTest
(wrong name: com/tm/Services/MMS/ServiceTest)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:
124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:
260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:
268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:
319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at org.junit.runner.JUnitCore.runMain(JUnitCore.java:72)
at org.junit.runner.JUnitCore.main(JUnitCore.java:44)
I have a file ServiceTest.class, but it's giving this error...