Compare commits
No commits in common. "45e760fcac57c6cbdf6f59fc9d014b61c3067ed6" and "2294ce535143585163ecc3226a99807426649918" have entirely different histories.
45e760fcac
...
2294ce5351
2 changed files with 1 additions and 13 deletions
|
|
@ -5,7 +5,7 @@ public class Visitor {
|
|||
private FeeCalculationStrategy feeCalculationStrategy;
|
||||
|
||||
public Visitor (int age) {
|
||||
if (age <= 14) {
|
||||
if (age < 14) {
|
||||
feeCalculationStrategy = new FeeCalculationStartegyForChildren();
|
||||
} else {
|
||||
feeCalculationStrategy = new FeeCalculationStrategyForAdults();
|
||||
|
|
|
|||
|
|
@ -30,18 +30,6 @@ 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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue