-
Notifications
You must be signed in to change notification settings - Fork 5
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
Beining/fix done command bugs #256
Conversation
} | ||
return new DoneCommand(indexes, durations); | ||
} catch (ParseException pe) { | ||
throw new ParseException( | ||
String.format(MESSAGE_INVALID_COMMAND_FORMAT, pe.getMessage(), DoneCommand.MESSAGE_USAGE), pe); | ||
} catch (NumberFormatException ne) { | ||
throw new ParseException("should be a positive number and the maximum duration is 2147483647 minutes"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Magic number
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MAX_INT = .....
then string format
Codecov Report
@@ Coverage Diff @@
## master #256 +/- ##
============================================
+ Coverage 43.06% 43.46% +0.39%
- Complexity 570 579 +9
============================================
Files 114 114
Lines 2835 2860 +25
Branches 421 435 +14
============================================
+ Hits 1221 1243 +22
Misses 1481 1481
- Partials 133 136 +3
Continue to review full report at Codecov.
|
@@ -19,9 +19,10 @@ public void isValidTitle() { | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this called isValidTitle??? Rename
@@ -19,9 +19,10 @@ public void isValidTitle() { | |||
|
|||
// invalid duration | |||
assertFalse(Duration.isValidDuration(-10)); // negative number |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test a few more values in each equivalence partition and especially near boundary values. Please include values such as 0, -1, some valid values and values near MAX_INT
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
fix #236 fix #220