[BAEL-6697] code for jacoco fail build

This commit is contained in:
uzma
2023-07-07 00:36:48 +01:00
parent 1db057ebc8
commit dc6e611fef
3 changed files with 43 additions and 5 deletions
@@ -9,7 +9,13 @@ class ProductServiceUnitTest {
@Test
public void givenOriginalPrice_whenGetSalePrice_thenReturnsDiscountedPrice() {
ProductService productService = new ProductService();
double salePrice = productService.getSalePrice(100);
double salePrice = productService.getSalePrice(100, true);
assertEquals(salePrice, 75);
}
@Test
public void givenOriginalPrice_whenGetSalePriceWithFlagFalse_thenReturnsDiscountedPrice() {
ProductService productService = new ProductService();
double salePrice = productService.getSalePrice(100, false);
assertEquals(salePrice, 100);
}
}