forked from nus-cs2103-AY2324S1/tp
-
Notifications
You must be signed in to change notification settings - Fork 4
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 #231 from FerdiHS/remove-customer-address
Remove Address in Customer since it is not used
- Loading branch information
Showing
4 changed files
with
0 additions
and
173 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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -14,7 +14,6 @@ | |
import org.junit.jupiter.api.Test; | ||
|
||
import seedu.address.logic.parser.exceptions.ParseException; | ||
import seedu.address.model.customer.Address; | ||
import seedu.address.model.customer.Email; | ||
import seedu.address.model.customer.Name; | ||
import seedu.address.model.customer.Phone; | ||
|
@@ -23,13 +22,11 @@ | |
public class ParserUtilTest { | ||
private static final String INVALID_NAME = "R@chel"; | ||
private static final String INVALID_PHONE = "+651234"; | ||
private static final String INVALID_ADDRESS = " "; | ||
private static final String INVALID_EMAIL = "example.com"; | ||
private static final String INVALID_TAG = "#friend"; | ||
|
||
private static final String VALID_NAME = "Rachel Walker"; | ||
private static final String VALID_PHONE = "90123456"; | ||
private static final String VALID_ADDRESS = "123 Main Street #0505"; | ||
private static final String VALID_EMAIL = "[email protected]"; | ||
private static final String VALID_TAG_1 = "friend"; | ||
private static final String VALID_TAG_2 = "neighbour"; | ||
|
@@ -102,29 +99,6 @@ public void parsePhone_validValueWithWhitespace_returnsTrimmedPhone() throws Exc | |
assertEquals(expectedPhone, ParserUtil.parsePhone(phoneWithWhitespace)); | ||
} | ||
|
||
@Test | ||
public void parseAddress_null_throwsNullPointerException() { | ||
assertThrows(NullPointerException.class, () -> ParserUtil.parseAddress((String) null)); | ||
} | ||
|
||
@Test | ||
public void parseAddress_invalidValue_throwsParseException() { | ||
assertThrows(ParseException.class, () -> ParserUtil.parseAddress(INVALID_ADDRESS)); | ||
} | ||
|
||
@Test | ||
public void parseAddress_validValueWithoutWhitespace_returnsAddress() throws Exception { | ||
Address expectedAddress = new Address(VALID_ADDRESS); | ||
assertEquals(expectedAddress, ParserUtil.parseAddress(VALID_ADDRESS)); | ||
} | ||
|
||
@Test | ||
public void parseAddress_validValueWithWhitespace_returnsTrimmedAddress() throws Exception { | ||
String addressWithWhitespace = WHITESPACE + VALID_ADDRESS + WHITESPACE; | ||
Address expectedAddress = new Address(VALID_ADDRESS); | ||
assertEquals(expectedAddress, ParserUtil.parseAddress(addressWithWhitespace)); | ||
} | ||
|
||
@Test | ||
public void parseEmail_null_throwsNullPointerException() { | ||
assertThrows(NullPointerException.class, () -> ParserUtil.parseEmail((String) null)); | ||
|
66 changes: 0 additions & 66 deletions
66
src/test/java/seedu/address/model/customer/AddressTest.java
This file was deleted.
Oops, something went wrong.