{"action":"created","comment":{"url":"https://api.github.com/repos/junit-team/junit4/pulls/comments/90548844","pull_request_review_id":11068728,"id":90548844,"diff_hunk":"@@ -35,9 +35,9 @@ public static void setUpOnce() {\n     public void setUp() {\n         fEmpty = new ArrayList<Integer>();\n         fFull = new ArrayList<Integer>();\n-        fFull.add(1);\n-        fFull.add(2);\n-        fFull.add(3);\n+        for (int i = 1; i < 4; i++) {","path":"src/test/java/org/junit/samples/ListTest.java","position":7,"original_position":7,"commit_id":"0df487a03aa6a367d8b03fe207ccbb143264d6be","original_commit_id":"0df487a03aa6a367d8b03fe207ccbb143264d6be","user":{"login":"kcooney","id":478190,"avatar_url":"https://avatars.githubusercontent.com/u/478190?v=3","gravatar_id":"","url":"https://api.github.com/users/kcooney","html_url":"https://github.com/kcooney","followers_url":"https://api.github.com/users/kcooney/followers","following_url":"https://api.github.com/users/kcooney/following{/other_user}","gists_url":"https://api.github.com/users/kcooney/gists{/gist_id}","starred_url":"https://api.github.com/users/kcooney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kcooney/subscriptions","organizations_url":"https://api.github.com/users/kcooney/orgs","repos_url":"https://api.github.com/users/kcooney/repos","events_url":"https://api.github.com/users/kcooney/events{/privacy}","received_events_url":"https://api.github.com/users/kcooney/received_events","type":"User","site_admin":false},"body":"I personally prefer to avoid loops in tests. Tests, especially unit tests, should be simple and obviously correct.\r\n\r\nIn this particular case, the `for` loop doesn't follow the standard idiom for looping `n` times. It does so for a good reason, but that makes the code slightly more confusing.","created_at":"2016-12-01T22:11:57Z","updated_at":"2016-12-01T22:13:52Z","html_url":"https://github.com/junit-team/junit4/pull/1398#discussion_r90548844","pull_request_url":"https://api.github.com/repos/junit-team/junit4/pulls/1398","_links":{"self":{"href":"https://api.github.com/repos/junit-team/junit4/pulls/comments/90548844"},"html":{"href":"https://github.com/junit-team/junit4/pull/1398#discussion_r90548844"},"pull_request":{"href":"https://api.github.com/repos/junit-team/junit4/pulls/1398"}}},"pull_request":{"url":"https://api.github.com/repos/junit-team/junit4/pulls/1398","id":96171336,"html_url":"https://github.com/junit-team/junit4/pull/1398","diff_url":"https://github.com/junit-team/junit4/pull/1398.diff","patch_url":"https://github.com/junit-team/junit4/pull/1398.patch","issue_url":"https://api.github.com/repos/junit-team/junit4/issues/1398","number":1398,"state":"open","locked":false,"title":"Putting a For Loop to reduce lines of code","user":{"login":"jesusmtzarvizu","id":22154923,"avatar_url":"https://avatars.githubusercontent.com/u/22154923?v=3","gravatar_id":"","url":"https://api.github.com/users/jesusmtzarvizu","html_url":"https://github.com/jesusmtzarvizu","followers_url":"https://api.github.com/users/jesusmtzarvizu/followers","following_url":"https://api.github.com/users/jesusmtzarvizu/following{/other_user}","gists_url":"https://api.github.com/users/jesusmtzarvizu/gists{/gist_id}","starred_url":"https://api.github.com/users/jesusmtzarvizu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jesusmtzarvizu/subscriptions","organizations_url":"https://api.github.com/users/jesusmtzarvizu/orgs","repos_url":"https://api.github.com/users/jesusmtzarvizu/repos","events_url":"https://api.github.com/users/jesusmtzarvizu/events{/privacy}","received_events_url":"https://api.github.com/users/jesusmtzarvizu/received_events","type":"User","site_admin":false},"body":"3 lines of code were changed for a For loop","created_at":"2016-12-01T21:12:15Z","updated_at":"2016-12-01T22:13:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9901fcdbae36d2978ecc62fc2645e440f4ac231f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/junit-team/junit4/pulls/1398/commits","review_comments_url":"https://api.github.com/repos/junit-team/junit4/pulls/1398/comments","review_comment_url":"https://api.github.com/repos/junit-team/junit4/pulls/comments{/number}","comments_url":"https://api.github.com/repos/junit-team/junit4/issues/1398/comments","statuses_url":"https://api.github.com/repos/junit-team/junit4/statuses/0df487a03aa6a367d8b03fe207ccbb143264d6be","head":{"label":"jesusmtzarvizu:master","ref":"master","sha":"0df487a03aa6a367d8b03fe207ccbb143264d6be","user":{"login":"jesusmtzarvizu","id":22154923,"avatar_url":"https://avatars.githubusercontent.com/u/22154923?v=3","gravatar_id":"","url":"https://api.github.com/users/jesusmtzarvizu","html_url":"https://github.com/jesusmtzarvizu","followers_url":"https://api.github.com/users/jesusmtzarvizu/followers","following_url":"https://api.github.com/users/jesusmtzarvizu/following{/other_user}","gists_url":"https://api.github.com/users/jesusmtzarvizu/gists{/gist_id}","starred_url":"https://api.github.com/users/jesusmtzarvizu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jesusmtzarvizu/subscriptions","organizations_url":"https://api.github.com/users/jesusmtzarvizu/orgs","repos_url":"https://api.github.com/users/jesusmtzarvizu/repos","events_url":"https://api.github.com/users/jesusmtzarvizu/events{/privacy}","received_events_url":"https://api.github.com/users/jesusmtzarvizu/received_events","type":"User","site_admin":false},"repo":{"id":75317538,"name":"junit4","full_name":"jesusmtzarvizu/junit4","owner":{"login":"jesusmtzarvizu","id":22154923,"avatar_url":"https://avatars.githubusercontent.com/u/22154923?v=3","gravatar_id":"","url":"https://api.github.com/users/jesusmtzarvizu","html_url":"https://github.com/jesusmtzarvizu","followers_url":"https://api.github.com/users/jesusmtzarvizu/followers","following_url":"https://api.github.com/users/jesusmtzarvizu/following{/other_user}","gists_url":"https://api.github.com/users/jesusmtzarvizu/gists{/gist_id}","starred_url":"https://api.github.com/users/jesusmtzarvizu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jesusmtzarvizu/subscriptions","organizations_url":"https://api.github.com/users/jesusmtzarvizu/orgs","repos_url":"https://api.github.com/users/jesusmtzarvizu/repos","events_url":"https://api.github.com/users/jesusmtzarvizu/events{/privacy}","received_events_url":"https://api.github.com/users/jesusmtzarvizu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jesusmtzarvizu/junit4","description":"A programmer-oriented testing framework for Java.","fork":true,"url":"https://api.github.com/repos/jesusmtzarvizu/junit4","forks_url":"https://api.github.com/repos/jesusmtzarvizu/junit4/forks","keys_url":"https://api.github.com/repos/jesusmtzarvizu/junit4/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jesusmtzarvizu/junit4/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jesusmtzarvizu/junit4/teams","hooks_url":"https://api.github.com/repos/jesusmtzarvizu/junit4/hooks","issue_events_url":"https://api.github.com/repos/jesusmtzarvizu/junit4/issues/events{/number}","events_url":"https://api.github.com/repos/jesusmtzarvizu/junit4/events","assignees_url":"https://api.github.com/repos/jesusmtzarvizu/junit4/assignees{/user}","branches_url":"https://api.github.com/repos/jesusmtzarvizu/junit4/branches{/branch}","tags_url":"https://api.github.com/repos/jesusmtzarvizu/junit4/tags","blobs_url":"https://api.github.com/repos/jesusmtzarvizu/junit4/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jesusmtzarvizu/junit4/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jesusmtzarvizu/junit4/git/refs{/sha}","trees_url":"https://api.github.com/repos/jesusmtzarvizu/junit4/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jesusmtzarvizu/junit4/statuses/{sha}","languages_url":"https://api.github.com/repos/jesusmtzarvizu/junit4/languages","stargazers_url":"https://api.github.com/repos/jesusmtzarvizu/junit4/stargazers","contributors_url":"https://api.github.com/repos/jesusmtzarvizu/junit4/contributors","subscribers_url":"https://api.github.com/repos/jesusmtzarvizu/junit4/subscribers","subscription_url":"https://api.github.com/repos/jesusmtzarvizu/junit4/subscription","commits_url":"https://api.github.com/repos/jesusmtzarvizu/junit4/commits{/sha}","git_commits_url":"https://api.github.com/repos/jesusmtzarvizu/junit4/git/commits{/sha}","comments_url":"https://api.github.com/repos/jesusmtzarvizu/junit4/comments{/number}","issue_comment_url":"https://api.github.com/repos/jesusmtzarvizu/junit4/issues/comments{/number}","contents_url":"https://api.github.com/repos/jesusmtzarvizu/junit4/contents/{+path}","compare_url":"https://api.github.com/repos/jesusmtzarvizu/junit4/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jesusmtzarvizu/junit4/merges","archive_url":"https://api.github.com/repos/jesusmtzarvizu/junit4/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jesusmtzarvizu/junit4/downloads","issues_url":"https://api.github.com/repos/jesusmtzarvizu/junit4/issues{/number}","pulls_url":"https://api.github.com/repos/jesusmtzarvizu/junit4/pulls{/number}","milestones_url":"https://api.github.com/repos/jesusmtzarvizu/junit4/milestones{/number}","notifications_url":"https://api.github.com/repos/jesusmtzarvizu/junit4/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jesusmtzarvizu/junit4/labels{/name}","releases_url":"https://api.github.com/repos/jesusmtzarvizu/junit4/releases{/id}","deployments_url":"https://api.github.com/repos/jesusmtzarvizu/junit4/deployments","created_at":"2016-12-01T17:47:26Z","updated_at":"2016-12-01T17:47:29Z","pushed_at":"2016-12-01T21:28:12Z","git_url":"git://github.com/jesusmtzarvizu/junit4.git","ssh_url":"git@github.com:jesusmtzarvizu/junit4.git","clone_url":"https://github.com/jesusmtzarvizu/junit4.git","svn_url":"https://github.com/jesusmtzarvizu/junit4","homepage":"http://junit.org/junit4/","size":21947,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"junit-team:master","ref":"master","sha":"44cd8f80dbac11849a42a5d73fc9b5ddc75cd1b4","user":{"login":"junit-team","id":874086,"avatar_url":"https://avatars.githubusercontent.com/u/874086?v=3","gravatar_id":"","url":"https://api.github.com/users/junit-team","html_url":"https://github.com/junit-team","followers_url":"https://api.github.com/users/junit-team/followers","following_url":"https://api.github.com/users/junit-team/following{/other_user}","gists_url":"https://api.github.com/users/junit-team/gists{/gist_id}","starred_url":"https://api.github.com/users/junit-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/junit-team/subscriptions","organizations_url":"https://api.github.com/users/junit-team/orgs","repos_url":"https://api.github.com/users/junit-team/repos","events_url":"https://api.github.com/users/junit-team/events{/privacy}","received_events_url":"https://api.github.com/users/junit-team/received_events","type":"Organization","site_admin":false},"repo":{"id":106310,"name":"junit4","full_name":"junit-team/junit4","owner":{"login":"junit-team","id":874086,"avatar_url":"https://avatars.githubusercontent.com/u/874086?v=3","gravatar_id":"","url":"https://api.github.com/users/junit-team","html_url":"https://github.com/junit-team","followers_url":"https://api.github.com/users/junit-team/followers","following_url":"https://api.github.com/users/junit-team/following{/other_user}","gists_url":"https://api.github.com/users/junit-team/gists{/gist_id}","starred_url":"https://api.github.com/users/junit-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/junit-team/subscriptions","organizations_url":"https://api.github.com/users/junit-team/orgs","repos_url":"https://api.github.com/users/junit-team/repos","events_url":"https://api.github.com/users/junit-team/events{/privacy}","received_events_url":"https://api.github.com/users/junit-team/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/junit-team/junit4","description":"A programmer-oriented testing framework for Java.","fork":false,"url":"https://api.github.com/repos/junit-team/junit4","forks_url":"https://api.github.com/repos/junit-team/junit4/forks","keys_url":"https://api.github.com/repos/junit-team/junit4/keys{/key_id}","collaborators_url":"https://api.github.com/repos/junit-team/junit4/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/junit-team/junit4/teams","hooks_url":"https://api.github.com/repos/junit-team/junit4/hooks","issue_events_url":"https://api.github.com/repos/junit-team/junit4/issues/events{/number}","events_url":"https://api.github.com/repos/junit-team/junit4/events","assignees_url":"https://api.github.com/repos/junit-team/junit4/assignees{/user}","branches_url":"https://api.github.com/repos/junit-team/junit4/branches{/branch}","tags_url":"https://api.github.com/repos/junit-team/junit4/tags","blobs_url":"https://api.github.com/repos/junit-team/junit4/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/junit-team/junit4/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/junit-team/junit4/git/refs{/sha}","trees_url":"https://api.github.com/repos/junit-team/junit4/git/trees{/sha}","statuses_url":"https://api.github.com/repos/junit-team/junit4/statuses/{sha}","languages_url":"https://api.github.com/repos/junit-team/junit4/languages","stargazers_url":"https://api.github.com/repos/junit-team/junit4/stargazers","contributors_url":"https://api.github.com/repos/junit-team/junit4/contributors","subscribers_url":"https://api.github.com/repos/junit-team/junit4/subscribers","subscription_url":"https://api.github.com/repos/junit-team/junit4/subscription","commits_url":"https://api.github.com/repos/junit-team/junit4/commits{/sha}","git_commits_url":"https://api.github.com/repos/junit-team/junit4/git/commits{/sha}","comments_url":"https://api.github.com/repos/junit-team/junit4/comments{/number}","issue_comment_url":"https://api.github.com/repos/junit-team/junit4/issues/comments{/number}","contents_url":"https://api.github.com/repos/junit-team/junit4/contents/{+path}","compare_url":"https://api.github.com/repos/junit-team/junit4/compare/{base}...{head}","merges_url":"https://api.github.com/repos/junit-team/junit4/merges","archive_url":"https://api.github.com/repos/junit-team/junit4/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/junit-team/junit4/downloads","issues_url":"https://api.github.com/repos/junit-team/junit4/issues{/number}","pulls_url":"https://api.github.com/repos/junit-team/junit4/pulls{/number}","milestones_url":"https://api.github.com/repos/junit-team/junit4/milestones{/number}","notifications_url":"https://api.github.com/repos/junit-team/junit4/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/junit-team/junit4/labels{/name}","releases_url":"https://api.github.com/repos/junit-team/junit4/releases{/id}","deployments_url":"https://api.github.com/repos/junit-team/junit4/deployments","created_at":"2009-01-13T03:41:26Z","updated_at":"2016-12-01T20:44:27Z","pushed_at":"2016-12-01T21:28:13Z","git_url":"git://github.com/junit-team/junit4.git","ssh_url":"git@github.com:junit-team/junit4.git","clone_url":"https://github.com/junit-team/junit4.git","svn_url":"https://github.com/junit-team/junit4","homepage":"http://junit.org/junit4/","size":37184,"stargazers_count":5486,"watchers_count":5486,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2142,"mirror_url":null,"open_issues_count":146,"forks":2142,"open_issues":146,"watchers":5486,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/junit-team/junit4/pulls/1398"},"html":{"href":"https://github.com/junit-team/junit4/pull/1398"},"issue":{"href":"https://api.github.com/repos/junit-team/junit4/issues/1398"},"comments":{"href":"https://api.github.com/repos/junit-team/junit4/issues/1398/comments"},"review_comments":{"href":"https://api.github.com/repos/junit-team/junit4/pulls/1398/comments"},"review_comment":{"href":"https://api.github.com/repos/junit-team/junit4/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/junit-team/junit4/pulls/1398/commits"},"statuses":{"href":"https://api.github.com/repos/junit-team/junit4/statuses/0df487a03aa6a367d8b03fe207ccbb143264d6be"}}}}
{"actor":{"display_login":"kcooney"}}