Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Unit Number #59

Merged

Conversation

KhoonSun47
Copy link

Update CLISyntax.java: Add prefix for unit number
Add UnitNumber.java: Add functionality to add unit number to add command
Add UnitNumberTest.java: Add test cases to test UnitNumber.java

Update CLISyntax.java: Add prefix for unit number
Add UnitNumber.java: Add functionality to add unit number to add command
Add UnitNumberTest.java: Add test cases to test UnitNumber.java
Update UnitNumberTest.java: Remove two test cases
@KhoonSun47 KhoonSun47 added the enhancement New feature or request label Mar 13, 2024
@KhoonSun47 KhoonSun47 added this to the v1.2 milestone Mar 13, 2024
@KhoonSun47 KhoonSun47 self-assigned this Mar 13, 2024
Copy link

codecov bot commented Mar 13, 2024

Codecov Report

Attention: Patch coverage is 90.00000% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 76.20%. Comparing base (81313f1) to head (2959dd0).
Report is 11 commits behind head on master.

Files Patch % Lines
...ain/java/seedu/address/model/house/UnitNumber.java 85.71% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master      #59      +/-   ##
============================================
+ Coverage     75.79%   76.20%   +0.40%     
- Complexity      431      450      +19     
============================================
  Files            72       74       +2     
  Lines          1376     1416      +40     
  Branches        131      135       +4     
============================================
+ Hits           1043     1079      +36     
- Misses          303      307       +4     
  Partials         30       30              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Update UnitNumber.java: Change the requirement such that unit number must be at least 1 digit,
and at most 3 digits (but cannot be 0)

Update UnitNumberTest.java: Change the test cases according to the new requirements
Update UnitNumber.java: Add another regex to test for the following input '0', '00', '000',
which should be invalid since a unit number cannot be '0's

Update UnitNumberTest.java: Update the test cases according to the new requirements
Copy link

@limcaaarl limcaaarl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍

Update ParserUtil.java: Add parsing of unit numbers

Update ParserUtilTest.java: Add test cases for parsing of unit numbers
Copy link
Collaborator

@felixchanyy felixchanyy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@felixchanyy felixchanyy merged commit 18fe28d into AY2324S2-CS2103-F09-1:master Mar 15, 2024
5 checks passed
@@ -11,6 +11,7 @@ public class CliSyntax {
public static final Prefix PREFIX_EMAIL = new Prefix("e/");
public static final Prefix PREFIX_ADDRESS = new Prefix("a/");
public static final Prefix PREFIX_TAG = new Prefix("t/");
public static final Prefix PREFIX_UNITNUMBER = new Prefix("unitNo/");
Copy link
Collaborator

@felixchanyy felixchanyy Mar 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be formatted like 'u/' to maintain consistency with the rest of the syntax?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants