-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from nhkhai/main
SIS-22: Updated ER Diagram to change mobile_no to phone_no.
- Loading branch information
Showing
8 changed files
with
25 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/java/sg/com/smartinventory/exceptions/ProductNotFoundException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
package sg.com.smartinventory.exceptions; | ||
|
||
public class ProductNotFoundException extends RuntimeException { | ||
public ProductNotFoundException(String id) { | ||
public ProductNotFoundException(Long id) { | ||
super("Could not find product with id: " + id + ". "); | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
src/main/java/sg/com/smartinventory/exceptions/ReviewNotFoundException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
package sg.com.smartinventory.exceptions; | ||
|
||
public class ReviewNotFoundException extends RuntimeException { | ||
public ReviewNotFoundException(String id) { | ||
public ReviewNotFoundException(Long id) { | ||
super("Could not find review with id: " + id + ". "); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,7 +42,7 @@ public void createCustomerTest() throws Exception { | |
|
||
// Step 1: Create a Customer object | ||
Customer newCustomer = Customer.builder().firstName("Jackie").lastName("Chan").country("Hong Kong") | ||
.address("123 HK St").postalCode(654321).mobileNumber(87654321) | ||
.address("123 HK St").postalCode(654321).phoneNumber(87654321) | ||
.email("[email protected]").build(); | ||
|
||
// Step 2: Convert the Java object to JSON using ObjectMapper. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,7 +48,7 @@ public class IntegrationTest { | |
public void createCustomerTest() { | ||
// 1. Setup. | ||
Customer testObject1 = Customer.builder().firstName("Jackie").lastName("Chan").country("Hong Kong") | ||
.address("123 HK St").postalCode(654321).mobileNumber(87654321) | ||
.address("123 HK St").postalCode(654321).phoneNumber(87654321) | ||
.email("[email protected]").build(); | ||
|
||
// mock the save method of the customer repository | ||
|
@@ -69,10 +69,10 @@ public void createCustomerTest() { | |
public void runIntegratedTest() throws Exception { | ||
// Step 1: Create the test objects. | ||
Customer testObject1 = Customer.builder().firstName("Jackie").lastName("Chan").country("Hong Kong") | ||
.address("123 HK St").postalCode(654321).mobileNumber(87654321) | ||
.address("123 HK St").postalCode(654321).phoneNumber(87654321) | ||
.email("[email protected]").build(); | ||
Customer testObject2 = Customer.builder().firstName("Jackie").lastName("Chang").country("Hong Kong") | ||
.address("123 HK St").postalCode(654321).mobileNumber(87654321) | ||
.address("123 HK St").postalCode(654321).phoneNumber(87654321) | ||
.email("[email protected]").build(); | ||
|
||
// Step 2: Convert the Java objects to JSON using ObjectMapper. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ public void createCustomerTest() { | |
// 1. SETUP | ||
// Create a new customer. | ||
Customer customer = Customer.builder().firstName("John").lastName("Wick").country("USA").address("123 Main St") | ||
.postalCode(123456).mobileNumber(12345678).email("[email protected]").build(); | ||
.postalCode(123456).phoneNumber(12345678).email("[email protected]").build(); | ||
|
||
// Mock the save method of the customer repository. | ||
when((customerRepository.save(customer))).thenReturn(customer); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,7 +48,7 @@ public class UseCaseTest { | |
public void createCustomerTest() { | ||
// 1. Setup. | ||
Customer testObject1 = Customer.builder().firstName("Jackie").lastName("Chan").country("Hong Kong") | ||
.address("123 HK St").postalCode(654321).mobileNumber(87654321) | ||
.address("123 HK St").postalCode(654321).phoneNumber(87654321) | ||
.email("[email protected]").build(); | ||
|
||
// mock the save method of the customer repository | ||
|
@@ -69,10 +69,10 @@ public void createCustomerTest() { | |
public void runIntegratedTest() throws Exception { | ||
// Step 1: Create the test objects. | ||
Customer testObject1 = Customer.builder().firstName("Jackie").lastName("Chan").country("Hong Kong") | ||
.address("123 HK St").postalCode(654321).mobileNumber(87654321) | ||
.address("123 HK St").postalCode(654321).phoneNumber(87654321) | ||
.email("[email protected]").build(); | ||
Customer testObject2 = Customer.builder().firstName("Jackie").lastName("Chang").country("Hong Kong") | ||
.address("123 HK St").postalCode(654321).mobileNumber(87654321) | ||
.address("123 HK St").postalCode(654321).phoneNumber(87654321) | ||
.email("[email protected]").build(); | ||
|
||
// Step 2: Convert the Java objects to JSON using ObjectMapper. | ||
|