Renamed test methods

This commit is contained in:
Michele Guarnaccia 2020-06-01 11:09:35 +02:00
parent e1c3aed23b
commit 8477fd9279
1 changed files with 4 additions and 4 deletions

View File

@ -22,14 +22,14 @@ public class PartialUpdateUnitTest {
CustomerService service; CustomerService service;
@Test @Test
public void loadAndSave_whenUpdate_thenSuccess() { public void givenCustomer_whenUpdate_thenSuccess() {
Customer myCustomer = service.addCustomer("John"); Customer myCustomer = service.addCustomer("John");
myCustomer = service.updateCustomer(myCustomer.id, "+00"); myCustomer = service.updateCustomer(myCustomer.id, "+00");
assertEquals("+00", myCustomer.phone); assertEquals("+00", myCustomer.phone);
} }
@Test @Test
public void customQuery_whenUpdate_thenSuccess() { public void givenCustomer_whenUpdateWithQuery_thenSuccess() {
Customer myCustomer = service.addCustomer("John"); Customer myCustomer = service.addCustomer("John");
service.updateCustomerWithCustomQuery(myCustomer.id, "+88"); service.updateCustomerWithCustomQuery(myCustomer.id, "+88");
myCustomer = service.getCustomer(myCustomer.id); myCustomer = service.getCustomer(myCustomer.id);
@ -37,7 +37,7 @@ public class PartialUpdateUnitTest {
} }
@Test @Test
public void loadAndSaveWithMapper_whenUpdate_thenSuccess() { public void givenCustomerDto_whenUpdateWithMapper_thenSuccess() {
CustomerDto dto = new CustomerDto(new Customer()); CustomerDto dto = new CustomerDto(new Customer());
dto.name = "Johnny"; dto.name = "Johnny";
Customer entity = service.addCustomer(dto); Customer entity = service.addCustomer(dto);
@ -50,7 +50,7 @@ public class PartialUpdateUnitTest {
} }
@Test @Test
public void loadAndSaveStructuredEntity_whenUpdate_thenSuccess() { public void givenCustomerStructured_whenUpdateCustomerPhone_thenSuccess() {
CustomerStructured myCustomer = service.addCustomerStructured("John"); CustomerStructured myCustomer = service.addCustomerStructured("John");
assertEquals(null, myCustomer.contactPhones); assertEquals(null, myCustomer.contactPhones);