how to write junit for this code
I am not able to write the junit for private method
I am not able to write the junit for private method
Hi @daniel-strmecki while writing junit for public method this private method not getting covered and coverage is getting down. if u hv any example please share
Hi @djohn98390536,
then you should write an additional test case for your public method that covers the private method as well. Private methods serve no purpose if they are not used in any public methods. The best practice in unit and integration testing is to test the APIs you expose, therefore, your public methods.
Good luck,
Daniel
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.