diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 3b4a8bcb83c..ce5f74f396b 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -40,7 +40,7 @@ RealConnect is a **desktop app for managing contacts, optimized for use via a Co 1. Ensure you have Java `17` or above installed in your Computer. -2. Download the latest `.jar` file from [here](https://github.com/se-edu/addressbook-level3/releases). +2. Download the latest `.jar` file from [here](https://github.com/AY2425S1-CS2103-F09-2/tp/releases). 3. Copy the file to the folder you want to use as the _home folder_ for your AddressBook. diff --git a/docs/images/Ui.png b/docs/images/Ui.png index 225872f916b..1d693c89a5a 100644 Binary files a/docs/images/Ui.png and b/docs/images/Ui.png differ diff --git a/src/main/java/seedu/address/model/person/Flags.java b/src/main/java/seedu/address/model/person/Flags.java index ab9b34de869..b8b8f2455f2 100644 --- a/src/main/java/seedu/address/model/person/Flags.java +++ b/src/main/java/seedu/address/model/person/Flags.java @@ -9,6 +9,7 @@ * Represent a set of preset labels to each person. Flags enables grouping of persons by multiple criteria in descending * significance. * Guarantee: Immutable. + * Note: this is a utility class for future feature: group by tags. Not used in app version v1.6. * */ public class Flags { private Set flagSet = new HashSet<>(); diff --git a/src/main/java/seedu/address/ui/HelpWindow.java b/src/main/java/seedu/address/ui/HelpWindow.java index 3f16b2fcf26..bbf2dc80803 100644 --- a/src/main/java/seedu/address/ui/HelpWindow.java +++ b/src/main/java/seedu/address/ui/HelpWindow.java @@ -15,7 +15,7 @@ */ public class HelpWindow extends UiPart { - public static final String USERGUIDE_URL = "https://se-education.org/addressbook-level3/UserGuide.html"; + public static final String USERGUIDE_URL = "https://ay2425s1-cs2103-f09-2.github.io/tp/UserGuide.html"; public static final String HELP_MESSAGE = "Refer to the user guide: " + USERGUIDE_URL; private static final Logger logger = LogsCenter.getLogger(HelpWindow.class); diff --git a/src/test/java/seedu/address/logic/parser/ParserUtilTest.java b/src/test/java/seedu/address/logic/parser/ParserUtilTest.java index d8108840298..ee910d7529b 100644 --- a/src/test/java/seedu/address/logic/parser/ParserUtilTest.java +++ b/src/test/java/seedu/address/logic/parser/ParserUtilTest.java @@ -208,6 +208,26 @@ public void parseDate_invalidDateFormat_throwsDateTimeException() throws ParseEx assertThrows(ParseException.class, () -> ParserUtil.parseDate(INVALID_DATE_STRING)); } + @Test + public void parseInteger_validIntegerWithoutWhitespace_returnsInteger() throws Exception { + assertEquals(123, ParserUtil.parseInteger("123")); + } + + @Test + public void parseInteger_validIntegerWithWhitespace_returnsTrimmedInteger() throws Exception { + assertEquals(123, ParserUtil.parseInteger(" 123 ")); + } + + @Test + public void parseInteger_invalidInteger_throwsParseException() { + assertThrows(ParseException.class, () -> ParserUtil.parseInteger("123abc")); + } + + @Test + public void parseInteger_nullInput_throwsNullPointerException() { + assertThrows(NullPointerException.class, () -> ParserUtil.parseInteger(null)); + } + @Test public void parseBirthday_invalidDateFormat_throwsDateTimeException() throws ParseException { assertThrows(ParseException.class, () -> ParserUtil.parseBirthday(INVALID_DATE_STRING)); diff --git a/src/test/java/seedu/address/model/person/FlagsTest.java b/src/test/java/seedu/address/model/person/FlagsTest.java index dc802e781ec..86e7bf37c16 100644 --- a/src/test/java/seedu/address/model/person/FlagsTest.java +++ b/src/test/java/seedu/address/model/person/FlagsTest.java @@ -45,7 +45,6 @@ public void testGetNumberOfMatchingFlags() { testFlags.add(PresetFlags.ARCHIVED); assertEquals(2, flags.getNumberOfMatchingFlags(testFlags)); - // Test with a set containing no matching flags. testFlags.clear(); testFlags.add(PresetFlags.BUYER); @@ -59,7 +58,7 @@ public void testGetWeightedFlags() { Flags flags = new Flags(PresetFlags.FAVOURITE, PresetFlags.BUYER, PresetFlags.SELLER); // Test weight calculation for matching flags. - // Assuming the weight is calculated as 2^index in reverse order: + // The weight is calculated as 2^index in reverse order: // FAVOURITE: index 0 -> 2^0 = 1 // ARCHIVED: index 1 -> 2^1 = 2 // BUYER: index 2 -> 2^2 = 4 @@ -85,7 +84,6 @@ public void testEmptyFlags() { PresetFlags.ARCHIVED, PresetFlags.BUYER, PresetFlags.SELLER)); assertEquals(0, emptyFlags.getNumberOfMatchingFlags(new HashSet<>())); - // Ensure that no flags are present. assertEquals(0, emptyFlags.flagIsPresent(PresetFlags.FAVOURITE)); assertEquals(0, emptyFlags.flagIsPresent(PresetFlags.ARCHIVED)); }