junit - unit testing action classes -
how unit test action classes ? frmework mock runner allows test action class. action class calling service class , service class in turn calls dao class..how resolve issue ?
you need stub/mock service classes used action class. let's have action class parses input, chooses appropriate service, makes call , give answer. need create dummy-service, inject action object , tests. mocking frameworks creating dummy services.
Comments
Post a Comment