JUnit NoClassDefFoundError -


i'm new @ junit , use inteliji idea.

import org.junit.test; import org.junit.ignore; import org.junit.runner.runwith; import org.junit.runners.junit4; import java.util.date; import static org.junit.assert.*; public class testquote {     @test     public void testquote() {         date date = new date(system.currenttimemillis());         quote quote=new quote("a",date,200.0,300.0,100.0,107.0,1.0);         assertnull("object null",quote);         assertequals("symbol ok",quote.getsymbol(),"a");         assertequals("date ok",quote.getdate(),system.currenttimemillis());         assertequals("open price ok",quote.getopenprice(),200.0);         assertequals("high price ok",quote.gethighprice(),300.0);         assertequals("low price ok",quote.getlowprice(),100.0);         assertequals("close price ok",quote.getcloseprice(),107.0);     } } 

here code of test class. junit.jar added classpath when run it says:

java.lang.noclassdeffounderror: org/hamcrest/selfdescribing 

any sollutions? btw main program work ok.

go junit web site: http://junit.org/

then click on "download , install guide" : https://github.com/junit-team/junit/wiki/download-and-install

then read:

download following jars , put them on test classpath:

  • junit.jar
  • hamcrest-core.jar

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -