My Production Code like this
public override double GetCharge(int daysRented)
{
double result = 2;
if (daysRented > 2)
result += (daysRented - 2) * 1.5;
return result;
}
It's mutants is
public override double GetCharge(int daysRented)
{
double result = 2;
if (daysRented >= 2)
result += (daysRented - 2) * 1.5;
return result;
}
I can't kill the mutants when the daysRented is 2, the if condition daysRented > 2 will not true and return 2 and the if condition daysRented >= 2 will true but add zero , so it also return 2
Should I try to kill the mutants ?? or just ignore it ?
Aucun commentaire:
Enregistrer un commentaire