[BAEL-4406] Move maven code to testing-libraries-2
This commit is contained in:
+14
@@ -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());
|
||||
}
|
||||
}
|
||||
+15
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user