{"action":"created","comment":{"url":"https://api.github.com/repos/se-edu/addressbook-level4/pulls/comments/167195297","pull_request_review_id":95379904,"id":167195297,"diff_hunk":"@@ -77,18 +81,49 @@ public void execute_invalidIndexFilteredList_throwsCommandException() {\n         assertCommandFailure(deleteCommand, model, Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);\n     }\n \n+    /**\n+     * Deletes a {@code Person} with different indexing from the unfiltered list to ensure {@code RedoCommand} deletes\n+     * by {@code Person} and not by {@code Index} during re-execution.\n+     */\n     @Test\n-    public void equals() {\n-        DeleteCommand deleteFirstCommand = new DeleteCommand(INDEX_FIRST_PERSON);\n-        DeleteCommand deleteSecondCommand = new DeleteCommand(INDEX_SECOND_PERSON);\n+    public void executeUndoRedo_validIndexFilteredList_samePersonDeleted() throws Exception {\n+        UndoRedoStack undoRedoStack = new UndoRedoStack();\n+        UndoCommand undoCommand = prepareUndoCommand(model, undoRedoStack);\n+        RedoCommand redoCommand = prepareRedoCommand(model, undoRedoStack);\n+        DeleteCommand deleteCommand = prepareCommand(INDEX_FIRST_PERSON);\n+        Model expectedModel = new ModelManager(model.getAddressBook(), new UserPrefs());\n+\n+        showPersonAtIndex(model, INDEX_SECOND_PERSON);\n+        Person personToDelete = model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());\n+        // delete -> deletes second person in unfiltered person list / first person in filtered person list\n+        deleteCommand.execute();\n+        undoRedoStack.push(deleteCommand);\n+\n+        // undo -> reverts addressbook back to previous state and filtered person list to show all persons\n+        assertCommandSuccess(undoCommand, model, UndoCommand.MESSAGE_SUCCESS, expectedModel);\n+\n+        expectedModel.deletePerson(personToDelete);\n+        assertNotEquals(personToDelete, model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased()));\n+        // redo -> deletes same second person in unfiltered person list\n+        assertCommandSuccess(redoCommand, model, RedoCommand.MESSAGE_SUCCESS, expectedModel);\n+    }\n+\n+    @Test\n+    public void equals() throws Exception {\n+        DeleteCommand deleteFirstCommand = prepareCommand(INDEX_FIRST_PERSON);\n+        DeleteCommand deleteSecondCommand = prepareCommand(INDEX_SECOND_PERSON);","path":"src/test/java/seedu/address/logic/commands/DeleteCommandTest.java","position":116,"original_position":60,"commit_id":"63bc158c4c384080547ff1491895ec6039a94374","original_commit_id":"945d70612a037efdb216b997c73ce7249ec48970","user":{"login":"yamidark","id":18352498,"avatar_url":"https://avatars1.githubusercontent.com/u/18352498?v=4","gravatar_id":"","url":"https://api.github.com/users/yamidark","html_url":"https://github.com/yamidark","followers_url":"https://api.github.com/users/yamidark/followers","following_url":"https://api.github.com/users/yamidark/following{/other_user}","gists_url":"https://api.github.com/users/yamidark/gists{/gist_id}","starred_url":"https://api.github.com/users/yamidark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yamidark/subscriptions","organizations_url":"https://api.github.com/users/yamidark/orgs","repos_url":"https://api.github.com/users/yamidark/repos","events_url":"https://api.github.com/users/yamidark/events{/privacy}","received_events_url":"https://api.github.com/users/yamidark/received_events","type":"User","site_admin":false},"body":"```\r\n    // different person -> returns false\r\n    assertFalse(deleteFirstCommand.equals(deleteSecondCommand));\r\n}\r\n```\r\nused in the very last line of the test (old test) :O.","created_at":"2018-02-09T10:45:49Z","updated_at":"2018-02-09T10:45:49Z","html_url":"https://github.com/se-edu/addressbook-level4/pull/792#discussion_r167195297","pull_request_url":"https://api.github.com/repos/se-edu/addressbook-level4/pulls/792","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/se-edu/addressbook-level4/pulls/comments/167195297"},"html":{"href":"https://github.com/se-edu/addressbook-level4/pull/792#discussion_r167195297"},"pull_request":{"href":"https://api.github.com/repos/se-edu/addressbook-level4/pulls/792"}},"in_reply_to_id":167123357},"pull_request":{"url":"https://api.github.com/repos/se-edu/addressbook-level4/pulls/792","id":162149332,"html_url":"https://github.com/se-edu/addressbook-level4/pull/792","diff_url":"https://github.com/se-edu/addressbook-level4/pull/792.diff","patch_url":"https://github.com/se-edu/addressbook-level4/pull/792.patch","issue_url":"https://api.github.com/repos/se-edu/addressbook-level4/issues/792","number":792,"state":"open","locked":false,"title":"Issue with undo/redo and modifications to filtered lists #737","user":{"login":"yamidark","id":18352498,"avatar_url":"https://avatars1.githubusercontent.com/u/18352498?v=4","gravatar_id":"","url":"https://api.github.com/users/yamidark","html_url":"https://github.com/yamidark","followers_url":"https://api.github.com/users/yamidark/followers","following_url":"https://api.github.com/users/yamidark/following{/other_user}","gists_url":"https://api.github.com/users/yamidark/gists{/gist_id}","starred_url":"https://api.github.com/users/yamidark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yamidark/subscriptions","organizations_url":"https://api.github.com/users/yamidark/orgs","repos_url":"https://api.github.com/users/yamidark/repos","events_url":"https://api.github.com/users/yamidark/events{/privacy}","received_events_url":"https://api.github.com/users/yamidark/received_events","type":"User","site_admin":false},"body":"Fixes #737 ","created_at":"2018-01-10T15:17:07Z","updated_at":"2018-02-09T10:45:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b8f73c74e863b0bb5401a47d13d5956830425ac9","assignee":null,"assignees":[],"requested_reviewers":[{"login":"eugenepeh","id":19277206,"avatar_url":"https://avatars2.githubusercontent.com/u/19277206?v=4","gravatar_id":"","url":"https://api.github.com/users/eugenepeh","html_url":"https://github.com/eugenepeh","followers_url":"https://api.github.com/users/eugenepeh/followers","following_url":"https://api.github.com/users/eugenepeh/following{/other_user}","gists_url":"https://api.github.com/users/eugenepeh/gists{/gist_id}","starred_url":"https://api.github.com/users/eugenepeh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eugenepeh/subscriptions","organizations_url":"https://api.github.com/users/eugenepeh/orgs","repos_url":"https://api.github.com/users/eugenepeh/repos","events_url":"https://api.github.com/users/eugenepeh/events{/privacy}","received_events_url":"https://api.github.com/users/eugenepeh/received_events","type":"User","site_admin":false}],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/se-edu/addressbook-level4/pulls/792/commits","review_comments_url":"https://api.github.com/repos/se-edu/addressbook-level4/pulls/792/comments","review_comment_url":"https://api.github.com/repos/se-edu/addressbook-level4/pulls/comments{/number}","comments_url":"https://api.github.com/repos/se-edu/addressbook-level4/issues/792/comments","statuses_url":"https://api.github.com/repos/se-edu/addressbook-level4/statuses/63bc158c4c384080547ff1491895ec6039a94374","head":{"label":"yamidark:737-undo-redo-incorrect-filtered-list","ref":"737-undo-redo-incorrect-filtered-list","sha":"63bc158c4c384080547ff1491895ec6039a94374","user":{"login":"yamidark","id":18352498,"avatar_url":"https://avatars1.githubusercontent.com/u/18352498?v=4","gravatar_id":"","url":"https://api.github.com/users/yamidark","html_url":"https://github.com/yamidark","followers_url":"https://api.github.com/users/yamidark/followers","following_url":"https://api.github.com/users/yamidark/following{/other_user}","gists_url":"https://api.github.com/users/yamidark/gists{/gist_id}","starred_url":"https://api.github.com/users/yamidark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yamidark/subscriptions","organizations_url":"https://api.github.com/users/yamidark/orgs","repos_url":"https://api.github.com/users/yamidark/repos","events_url":"https://api.github.com/users/yamidark/events{/privacy}","received_events_url":"https://api.github.com/users/yamidark/received_events","type":"User","site_admin":false},"repo":{"id":115731630,"name":"addressbook-level4","full_name":"yamidark/addressbook-level4","owner":{"login":"yamidark","id":18352498,"avatar_url":"https://avatars1.githubusercontent.com/u/18352498?v=4","gravatar_id":"","url":"https://api.github.com/users/yamidark","html_url":"https://github.com/yamidark","followers_url":"https://api.github.com/users/yamidark/followers","following_url":"https://api.github.com/users/yamidark/following{/other_user}","gists_url":"https://api.github.com/users/yamidark/gists{/gist_id}","starred_url":"https://api.github.com/users/yamidark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yamidark/subscriptions","organizations_url":"https://api.github.com/users/yamidark/orgs","repos_url":"https://api.github.com/users/yamidark/repos","events_url":"https://api.github.com/users/yamidark/events{/privacy}","received_events_url":"https://api.github.com/users/yamidark/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yamidark/addressbook-level4","description":"Address Book sample application (Level 4)","fork":true,"url":"https://api.github.com/repos/yamidark/addressbook-level4","forks_url":"https://api.github.com/repos/yamidark/addressbook-level4/forks","keys_url":"https://api.github.com/repos/yamidark/addressbook-level4/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yamidark/addressbook-level4/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yamidark/addressbook-level4/teams","hooks_url":"https://api.github.com/repos/yamidark/addressbook-level4/hooks","issue_events_url":"https://api.github.com/repos/yamidark/addressbook-level4/issues/events{/number}","events_url":"https://api.github.com/repos/yamidark/addressbook-level4/events","assignees_url":"https://api.github.com/repos/yamidark/addressbook-level4/assignees{/user}","branches_url":"https://api.github.com/repos/yamidark/addressbook-level4/branches{/branch}","tags_url":"https://api.github.com/repos/yamidark/addressbook-level4/tags","blobs_url":"https://api.github.com/repos/yamidark/addressbook-level4/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yamidark/addressbook-level4/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yamidark/addressbook-level4/git/refs{/sha}","trees_url":"https://api.github.com/repos/yamidark/addressbook-level4/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yamidark/addressbook-level4/statuses/{sha}","languages_url":"https://api.github.com/repos/yamidark/addressbook-level4/languages","stargazers_url":"https://api.github.com/repos/yamidark/addressbook-level4/stargazers","contributors_url":"https://api.github.com/repos/yamidark/addressbook-level4/contributors","subscribers_url":"https://api.github.com/repos/yamidark/addressbook-level4/subscribers","subscription_url":"https://api.github.com/repos/yamidark/addressbook-level4/subscription","commits_url":"https://api.github.com/repos/yamidark/addressbook-level4/commits{/sha}","git_commits_url":"https://api.github.com/repos/yamidark/addressbook-level4/git/commits{/sha}","comments_url":"https://api.github.com/repos/yamidark/addressbook-level4/comments{/number}","issue_comment_url":"https://api.github.com/repos/yamidark/addressbook-level4/issues/comments{/number}","contents_url":"https://api.github.com/repos/yamidark/addressbook-level4/contents/{+path}","compare_url":"https://api.github.com/repos/yamidark/addressbook-level4/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yamidark/addressbook-level4/merges","archive_url":"https://api.github.com/repos/yamidark/addressbook-level4/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yamidark/addressbook-level4/downloads","issues_url":"https://api.github.com/repos/yamidark/addressbook-level4/issues{/number}","pulls_url":"https://api.github.com/repos/yamidark/addressbook-level4/pulls{/number}","milestones_url":"https://api.github.com/repos/yamidark/addressbook-level4/milestones{/number}","notifications_url":"https://api.github.com/repos/yamidark/addressbook-level4/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yamidark/addressbook-level4/labels{/name}","releases_url":"https://api.github.com/repos/yamidark/addressbook-level4/releases{/id}","deployments_url":"https://api.github.com/repos/yamidark/addressbook-level4/deployments","created_at":"2017-12-29T15:08:24Z","updated_at":"2017-12-29T15:08:27Z","pushed_at":"2018-02-09T10:21:56Z","git_url":"git://github.com/yamidark/addressbook-level4.git","ssh_url":"git@github.com:yamidark/addressbook-level4.git","clone_url":"https://github.com/yamidark/addressbook-level4.git","svn_url":"https://github.com/yamidark/addressbook-level4","homepage":"https://se-edu.github.io/addressbook-level4","size":7197,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"se-edu:master","ref":"master","sha":"2e7f092c5e58dff587347304f59b0b8286abdaee","user":{"login":"se-edu","id":20763652,"avatar_url":"https://avatars2.githubusercontent.com/u/20763652?v=4","gravatar_id":"","url":"https://api.github.com/users/se-edu","html_url":"https://github.com/se-edu","followers_url":"https://api.github.com/users/se-edu/followers","following_url":"https://api.github.com/users/se-edu/following{/other_user}","gists_url":"https://api.github.com/users/se-edu/gists{/gist_id}","starred_url":"https://api.github.com/users/se-edu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/se-edu/subscriptions","organizations_url":"https://api.github.com/users/se-edu/orgs","repos_url":"https://api.github.com/users/se-edu/repos","events_url":"https://api.github.com/users/se-edu/events{/privacy}","received_events_url":"https://api.github.com/users/se-edu/received_events","type":"Organization","site_admin":false},"repo":{"id":65120941,"name":"addressbook-level4","full_name":"se-edu/addressbook-level4","owner":{"login":"se-edu","id":20763652,"avatar_url":"https://avatars2.githubusercontent.com/u/20763652?v=4","gravatar_id":"","url":"https://api.github.com/users/se-edu","html_url":"https://github.com/se-edu","followers_url":"https://api.github.com/users/se-edu/followers","following_url":"https://api.github.com/users/se-edu/following{/other_user}","gists_url":"https://api.github.com/users/se-edu/gists{/gist_id}","starred_url":"https://api.github.com/users/se-edu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/se-edu/subscriptions","organizations_url":"https://api.github.com/users/se-edu/orgs","repos_url":"https://api.github.com/users/se-edu/repos","events_url":"https://api.github.com/users/se-edu/events{/privacy}","received_events_url":"https://api.github.com/users/se-edu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/se-edu/addressbook-level4","description":"Address Book sample application (Level 4)","fork":false,"url":"https://api.github.com/repos/se-edu/addressbook-level4","forks_url":"https://api.github.com/repos/se-edu/addressbook-level4/forks","keys_url":"https://api.github.com/repos/se-edu/addressbook-level4/keys{/key_id}","collaborators_url":"https://api.github.com/repos/se-edu/addressbook-level4/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/se-edu/addressbook-level4/teams","hooks_url":"https://api.github.com/repos/se-edu/addressbook-level4/hooks","issue_events_url":"https://api.github.com/repos/se-edu/addressbook-level4/issues/events{/number}","events_url":"https://api.github.com/repos/se-edu/addressbook-level4/events","assignees_url":"https://api.github.com/repos/se-edu/addressbook-level4/assignees{/user}","branches_url":"https://api.github.com/repos/se-edu/addressbook-level4/branches{/branch}","tags_url":"https://api.github.com/repos/se-edu/addressbook-level4/tags","blobs_url":"https://api.github.com/repos/se-edu/addressbook-level4/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/se-edu/addressbook-level4/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/se-edu/addressbook-level4/git/refs{/sha}","trees_url":"https://api.github.com/repos/se-edu/addressbook-level4/git/trees{/sha}","statuses_url":"https://api.github.com/repos/se-edu/addressbook-level4/statuses/{sha}","languages_url":"https://api.github.com/repos/se-edu/addressbook-level4/languages","stargazers_url":"https://api.github.com/repos/se-edu/addressbook-level4/stargazers","contributors_url":"https://api.github.com/repos/se-edu/addressbook-level4/contributors","subscribers_url":"https://api.github.com/repos/se-edu/addressbook-level4/subscribers","subscription_url":"https://api.github.com/repos/se-edu/addressbook-level4/subscription","commits_url":"https://api.github.com/repos/se-edu/addressbook-level4/commits{/sha}","git_commits_url":"https://api.github.com/repos/se-edu/addressbook-level4/git/commits{/sha}","comments_url":"https://api.github.com/repos/se-edu/addressbook-level4/comments{/number}","issue_comment_url":"https://api.github.com/repos/se-edu/addressbook-level4/issues/comments{/number}","contents_url":"https://api.github.com/repos/se-edu/addressbook-level4/contents/{+path}","compare_url":"https://api.github.com/repos/se-edu/addressbook-level4/compare/{base}...{head}","merges_url":"https://api.github.com/repos/se-edu/addressbook-level4/merges","archive_url":"https://api.github.com/repos/se-edu/addressbook-level4/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/se-edu/addressbook-level4/downloads","issues_url":"https://api.github.com/repos/se-edu/addressbook-level4/issues{/number}","pulls_url":"https://api.github.com/repos/se-edu/addressbook-level4/pulls{/number}","milestones_url":"https://api.github.com/repos/se-edu/addressbook-level4/milestones{/number}","notifications_url":"https://api.github.com/repos/se-edu/addressbook-level4/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/se-edu/addressbook-level4/labels{/name}","releases_url":"https://api.github.com/repos/se-edu/addressbook-level4/releases{/id}","deployments_url":"https://api.github.com/repos/se-edu/addressbook-level4/deployments","created_at":"2016-08-07T07:17:26Z","updated_at":"2018-02-09T08:58:57Z","pushed_at":"2018-02-09T10:33:04Z","git_url":"git://github.com/se-edu/addressbook-level4.git","ssh_url":"git@github.com:se-edu/addressbook-level4.git","clone_url":"https://github.com/se-edu/addressbook-level4.git","svn_url":"https://github.com/se-edu/addressbook-level4","homepage":"https://se-edu.github.io/addressbook-level4","size":16107,"stargazers_count":8,"watchers_count":8,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":736,"mirror_url":null,"archived":false,"open_issues_count":122,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":736,"open_issues":122,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/se-edu/addressbook-level4/pulls/792"},"html":{"href":"https://github.com/se-edu/addressbook-level4/pull/792"},"issue":{"href":"https://api.github.com/repos/se-edu/addressbook-level4/issues/792"},"comments":{"href":"https://api.github.com/repos/se-edu/addressbook-level4/issues/792/comments"},"review_comments":{"href":"https://api.github.com/repos/se-edu/addressbook-level4/pulls/792/comments"},"review_comment":{"href":"https://api.github.com/repos/se-edu/addressbook-level4/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/se-edu/addressbook-level4/pulls/792/commits"},"statuses":{"href":"https://api.github.com/repos/se-edu/addressbook-level4/statuses/63bc158c4c384080547ff1491895ec6039a94374"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"yamidark"}}