BAEL-3201 - Updated test method names

This commit is contained in:
Abhinav Pandey 2022-07-10 19:14:31 +05:30 committed by GitHub
parent 282cd67ad4
commit bc4857f6be
1 changed files with 5 additions and 5 deletions

View File

@ -25,7 +25,7 @@ public class ProductServiceIntegrationTest {
private ProductService productService;
@Test
void testCreateProduct() {
void givenProductCreated_whenGettingProductById_thenProductExistsAndHasSameProperties() {
Product product = new Product("1", "Test Product", 10.0);
productService.createProduct(product);
Product productFromDb = productService.getProduct("1");
@ -35,7 +35,7 @@ public class ProductServiceIntegrationTest {
}
@Test
void testUpdateProduct() {
void givenProductCreatedAndUpdated_whenGettingTheProduct_thenUpdatedProductReturned() {
Product product = new Product("1", "Test Product", 10.0);
productService.createProduct(product);
Product productFromDb = productService.getProduct("1");
@ -51,7 +51,7 @@ public class ProductServiceIntegrationTest {
}
@Test
void testDeleteProduct() {
void givenProductCreatedAndDeleted_whenGettingTheProduct_thenNoProductReturned() {
Product product = new Product("1", "Test Product", 10.0);
productService.createProduct(product);
Product productFromDb = productService.getProduct("1");
@ -64,7 +64,7 @@ public class ProductServiceIntegrationTest {
}
@Test
void testGetProduct() {
void givenProductCreated_whenGettingProductById_thenSameProductReturned() {
Product product = new Product("1", "Test Product", 10.0);
productService.createProduct(product);
Product productFromDb = productService.getProduct("1");