jeudi 31 mai 2018

unable to write mockito test case for my void method

public class Calculation {

public void logTimeTaken(String label, long estimatedTime, int size, boolean isDebug) { out = label + " took " + TimeUnit.MILLISECONDS.convert(estimatedTime, TimeUnit.NANOSECONDS) + " milliseconds for " + size + " events!"; if (isDebug) { System.out.println(out); } else { System.out.println("if isDebug is false "+out); } }

I need to test this code with mockito(junit) ,I search so many examples google but still not getting any idea,kindly help me in this

Aucun commentaire:

Enregistrer un commentaire