Merge pull request #14373 from ukhan1980/BAEL-6697-fail-maven-build-if-coverage-falls
[BAEL-6697] code for jacoco fail build
This commit is contained in:
+8
-1
@@ -9,7 +9,14 @@ 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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user