Okay, so I'm doing an homework and I have to create an object called Bonus.
And I have to do a test. In that case, I'm doing testing [getBonusPercent]
But yet, it tell it doesn't work because The method assertEquals(double, double) from the type Assert is deprecated.
I don't understand what am I doing wrong. This should worked fine
Also, sorry for my broken English.
I tried other Assert but so far, nothing work. Also, i have import static [org.junit.Assert.assertEquals;] wrote in the script
In the main methode
private float bonusPercentage;
Bonus(float bonus) {
this.bonusPercentage = bonus;
}
public float getBonusPercent() {
return this.bonusPercentage;
}
The test
this.bonus = new Bonus(BONUS);
assertEquals(BONUS, this.bonus.getBonusPercent());
assertEquals(double, double) from the type Assert is deprecated.