-1
I’m learning Junit and I’m trying to test the toString method, but I can’t do it. I would like the help to understand where and how I should begin.
Follows code below
public String toString(){
if(marcado) {
return "x";
} else if (aberto && minado){
return "*";
} else if (aberto && minasNaVizinhanca() > 0){
return Long.toString(minasNaVizinhanca());
} else if (aberto) {
return " ";
} else {
return "?";
}
}