I make a Pokemon.java class and a PokemeonTest. Need topass all the junit test. But I am fail the toStringTest1 , 2 and 3.Don’t know why.
This is part of my Pokemon.java code.
public String toString(){
DecimalFormat decimal = new DecimalFormat(“000”);
String string = “”;
string =string + “Species: ” + this.species + “n”;
if(this.species.compareTo(this.name) != 0){
string =string + “Name: ” +this.name + “n”;
}
string =string + “Number: ” + decimal.format(this.number) +”n”;
string =string + “Type: ” + this.type1;
if(this.type2.length() > 0){
string = string + ” | ” + this.type2;
}
string =string + “n”;
string =string + “HP: ” + this.hitPnts + “n”;
string =string + “CP: ” +this.comPwr +”n”;
return string;
}
And This
PayPal Gateway not configured
PayPal Gateway not configured