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

[W5][W17-1] Lee Wei Kang #144

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

Wklee96
Copy link

@Wklee96 Wklee96 commented Feb 12, 2019

Added sort command

import seedu.addressbook.commands.ListCommand;
import seedu.addressbook.commands.ViewAllCommand;
import seedu.addressbook.commands.ViewCommand;
import seedu.addressbook.commands.*;
Copy link

Choose a reason for hiding this comment

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

Suggest switching back to importing commands one by one as mentioned in class.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for the reminder!

Choose a reason for hiding this comment

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

Since you've added a new command, it would be good if you could add it in the Help Command's guide as instructions for new users

Copy link
Author

Choose a reason for hiding this comment

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

Yes definitely! Thank you for your suggestion! (:

== Listing all persons sorted by their names : `sort`

Shows a list of all persons sorted by their names, along with their non-private details, in the address book. +
Format: `list`
Copy link

Choose a reason for hiding this comment

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

I think perhaps the format is wrong? For a sort command, the format should be: 'sort'?

Copy link
Author

Choose a reason for hiding this comment

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

Yes thanks for pointing that out!

import java.util.Collections;
import java.util.List;

public class SortCommand extends Command{
Copy link

Choose a reason for hiding this comment

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

Do look out for the missing whitespace between Command and {, and the javadoc comment for the class.

private List<ReadOnlyPerson> listWithInorderedTypicalPersons = Arrays.asList(td.amy, td.candy, td.bill, td.dan);

@Test
public void execute_invalidIndex_returnsInvalidIndexMessage() {
Copy link

Choose a reason for hiding this comment

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

The naming of this method seems a little unclear - are you testing for an invalid index?

Copy link

@sharan8 sharan8 left a comment

Choose a reason for hiding this comment

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

Hi Wei Kang, some comments:

  • Good that you updated the User Guide, I/O tests and JUnit Tests.
  • Look out for the minor coding style aspects (E.g. missing whitespaces)
  • Consider all parts of the project that will need to be updated following your change. (E.g. Adding your command information to the help section.
  • Think about ways in which you can improve your JUnit test. (E.g. what is the expected behaviour when the addressbook is empty?)
  • You can also explore the use of the setUp() method in JUnit for the setup involved in your tests (Check out the DeleteCommandTest class in AB2).
  • Good that you used a branch to implement this enhancement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants