I used Intellij Idea 12 Community edition. I am trying to create test case for my class by creating test case. When i run my test case it says
java.lang.NoC
Did you include the hamcrest-core-1.3.jar
file in your classpath? If not included means include that jar and try once again.
add junit.jar to your project dependence. you may also need to add hamcrest.jar in addition.
Open File->Project Structure,Click Modules->Dependences,add junit.jar.
If you come across this (and a few other threads) on this error and adding the jar to dependencies doesn't work, you will need to add to the general java classpath.
I encountered this error in OSX where maven would download the dependency, but not find it when in fork mode.
Adding all the hamcrest jars to Library/Java/Extensions finally fixed the problem when nothing else would.
Latest version of hamcrest-all is available at: https://search.maven.org/search?q=a:hamcrest-all
Download this version (as opposed to the hamcrest-core) and that should do it.