Ajout d'un test pour couvrir le cas limite du commit précédent

This commit is contained in:
Feror 2025-01-23 12:16:35 +01:00
parent a93f449d76
commit 45e760fcac

View file

@ -30,6 +30,18 @@ class FeeCalculatorTest {
assertThat(actualFee).isEqualTo(50.0);
}
@Test
public void for_age_exactly_14_should_be_child() {
//GIVEN
Visitor child = new Visitor(14);
//WHEN
double actualFee = FeeCalculator.calculateFee(child, TicketType.FULL_DAY);
//THEN
assertThat(actualFee).isEqualTo(50.0);
}
@Test
public void for_age_above_14_HALF_DAY_should_calculate_60() {
//GIVEN