Assignment_bookStore
Assignment_bookStore
package bookStore;
}
package bookStore;
import java.util.List;
Your task is to write a unit test for the getTotalBill method in the OrderCart class.
Use Mockito to mock the PricingService interface and simulate different scenarios.
3. Price-Based Discount:
4. Write a test case using Mockito's verify method to ensure that the getDiscount method is only called
for items that meet the discount rule criteria. According to the rule:
- No discount should be applied for books priced below $10, so getDiscount should not be called
for these items.
- getDiscount should be called for items priced at $10 or above