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

Info command #125

Merged
merged 9 commits into from Oct 16, 2019
Merged

Info command #125

merged 9 commits into from Oct 16, 2019

Conversation

hoholyin
Copy link

No description provided.

Copy link

@Cronyxx Cronyxx left a comment

Choose a reason for hiding this comment

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

Overall, the Info Command feature was well done. Good job!

@@ -5,18 +5,25 @@
*/
public class Messages {
Copy link

Choose a reason for hiding this comment

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

Do we want to consider splitting the messages into different classes? For example, BookMessages, CommandMessages, etc.

Copy link
Author

Choose a reason for hiding this comment

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

We can look into it! If i'm not wrong the other PRs have new Messages as well so we can split it once we merge everyone's PR

@@ -48,7 +50,7 @@ public void parse_missingParts_failure() {
assertParseFailure(parser, VALID_TITLE_BOOK_1, MESSAGE_INVALID_FORMAT);

// no field specified
assertParseFailure(parser, "1", EditCommand.MESSAGE_NOT_EDITED);
assertParseFailure(parser, VALID_INDEX_ONE, EditCommand.MESSAGE_NOT_EDITED);
Copy link

Choose a reason for hiding this comment

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

Good job replacing magic numbers with a symbolic constant!

@@ -11,11 +11,14 @@

public class FindCommandParserTest {

private static final String EMPTY_STRING = " ";
Copy link

Choose a reason for hiding this comment

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

I think you can consider renaming this constant to SPACES instead of EMPTY_STRING as an empty string would tend to refer to "" in my opinion.


private static final String VALID_INDEX_ONE = "1";
private static final String VALID_INDEX_TWO = "2";
private static final String EMPTY_STRING = " ";
Copy link

Choose a reason for hiding this comment

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

Same here.

Comment on lines +49 to +55
private String getSerialNumberAsString(Book target) {
return target.getSerialNumber().toString();
}

private String getTitleFromBook(Book target) {
return target.getTitle().toString();
}

Choose a reason for hiding this comment

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

Good job using the toString() method instead of the exact value!

@Cronyxx Cronyxx merged commit ae7d23b into AY1920S1-CS2103T-F13-1:master Oct 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants