mercredi 26 août 2020

Is testing everything a good approach?

I have class Generator with a method buildDocument and inside this method there is: service.getDocument() + EXTENSION; where private final static String EXTENSION = ".txt";

method getDocument() is already tested in ServiceTest class. Should I add test for buildDocument method to test this file extension adding? It seems a bit like testing:

private boolean method(){
   return true;
}

should such methods be tested?

Aucun commentaire:

Enregistrer un commentaire