Skip to content

Commit 46145ed

Browse files
committed
feat(tiered_pricing): 🔴 test for third pricing range
1 parent 2478c8d commit 46145ed

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

exercises/tiered_pricing/solutions/oflorez/src/test/java/tv/codely/checkout/TieredPricingShould.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ void calculate_total_value_for_second_pricing_range() {
2323
assertEquals(calculateTotalPriceExpected(SECOND_RANGE_UNIT_PRICE, subscription), pricing.calculateTotalPrice(subscription));
2424
}
2525

26+
@Test
27+
void calculate_total_value_for_third_pricing_range() {
28+
var pricing = new TieredPricing();
29+
var subscription = retrieveSubscriptionGivenRange(11,25);
30+
assertEquals(calculateTotalPriceExpected(219, subscription), pricing.calculateTotalPrice(subscription));
31+
}
32+
2633
private int retrieveSubscriptionGivenRange(int lowerLimit, int upperLimit) {
2734
return IntStream.rangeClosed(lowerLimit, upperLimit).findAny().getAsInt();
2835
}

0 commit comments

Comments
 (0)