[BAEL-4406] Move maven code to testing-libraries-2

This commit is contained in:
uzma khan
2021-06-03 10:11:38 +01:00
parent 2326e02ed2
commit 6ab67e6968
15 changed files with 31 additions and 86 deletions
@@ -0,0 +1,14 @@
package com.baeldung.jacocoexclusions.service;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertNotNull;
class CustomerServiceUnitTest {
@Test
public void givenCustomer_whenGetCustomer_thenReturnNewCustomer() {
CustomerService customerService = new CustomerService();
assertNotNull(customerService.getCustomerName());
}
}
@@ -0,0 +1,15 @@
package com.baeldung.jacocoexclusions.service;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
class ProductServiceUnitTest {
@Test
public void givenOriginalPrice_whenGetSalePrice_thenReturnsDiscountedPrice() {
ProductService productService = new ProductService();
double salePrice = productService.getSalePrice(100);
assertEquals(salePrice, 75);
}
}