{"action":"created","comment":{"url":"https://api.github.com/repos/exercism/java/pulls/comments/175498986","pull_request_review_id":105030155,"id":175498986,"diff_hunk":"@@ -0,0 +1,189 @@\n+import org.junit.Ignore;\n+import org.junit.Test;\n+\n+import java.util.ArrayList;\n+import java.util.Arrays;\n+import java.util.Collections;\n+\n+import static org.junit.Assert.assertEquals;\n+import static org.junit.Assert.assertNull;\n+\n+public class DominoesTest {\n+\t\n+\t@Test\n+\tpublic void emtpyInputEmptyOutputTest() {\n+\t\tDominoes dominoes = new Dominoes();\n+\t\t\n+\t\tArrayList<Domino> dominoesArray = new ArrayList<>();\n+\t\t\n+\t\tArrayList<Domino> chain = dominoes.formChain(dominoesArray);\n+\t\t\n+\t\tassertNull(chain);\n+\t}\n+\t\n+\t@Ignore(\"Remove to run test\")\n+\t@Test\n+\tpublic void singletonInputSingletonOutput() {\n+\t\tDominoes dominoes = new Dominoes();\n+\t\t\n+\t\tDomino[] dominoesList = {new Domino(1, 1)};\n+\t\tArrayList<Domino> dominoesArray = new ArrayList<>(Arrays.asList(dominoesList));\n+\t\t\n+\t\tArrayList<Domino> chain = dominoes.formChain(dominoesArray);\n+\t\t\n+\t\tassertValidChain(dominoesArray, chain);\n+\t}\n+\t\n+\t@Ignore(\"Remove to run test\")\n+\t@Test\n+\tpublic void singletonCantBeChainedTest() {\n+\t\tDominoes dominoes = new Dominoes();\n+\t\t\n+\t\tDomino[] dominoesList = {new Domino(1, 2)};\n+\t\tArrayList<Domino> dominoesArray = new ArrayList<>(Arrays.asList(dominoesList));\n+\t\t\n+\t\tArrayList<Domino> chain = dominoes.formChain(dominoesArray);\n+\t\t\n+\t\tassertNull(chain);\n+\t}\n+\t\n+\t@Ignore(\"Remove to run test\")\n+\t@Test\n+\tpublic void threeElementsTest() {\n+\t\tDominoes dominoes = new Dominoes();\n+\t\t\n+\t\tDomino[] dominoesList = {new Domino(1, 2), new Domino(3, 1), new Domino(2, 3)};\n+\t\tArrayList<Domino> dominoesArray = new ArrayList<>(Arrays.asList(dominoesList));\n+\t\t\n+\t\tArrayList<Domino> chain = dominoes.formChain(dominoesArray);\n+\t\t\n+\t\tassertValidChain(dominoesArray, chain);\n+\t}\n+\t\n+\t@Ignore(\"Remove to run test\")\n+\t@Test\n+\tpublic void canReverseDominoesTest() {\n+\t\tDominoes dominoes = new Dominoes();\n+\t\t\n+\t\tDomino[] dominoesList = {new Domino(1, 2), new Domino(1, 3), new Domino(2, 3)};\n+\t\tArrayList<Domino> dominoesArray = new ArrayList<>(Arrays.asList(dominoesList));\n+\t\t\n+\t\tArrayList<Domino> chain = dominoes.formChain(dominoesArray);\n+\t\t\n+\t\tassertValidChain(dominoesArray, chain);\n+\t}\n+\t\n+\t@Ignore(\"Remove to run test\")\n+\t@Test\n+\tpublic void cantBeChainedTest() {\n+\t\tDominoes dominoes = new Dominoes();\n+\t\t\n+\t\tDomino[] dominoesList = {new Domino(1, 2), new Domino(4, 1), new Domino(2, 3)};\n+\t\tArrayList<Domino> dominoesArray = new ArrayList<>(Arrays.asList(dominoesList));\n+\t\t\n+\t\tArrayList<Domino> chain = dominoes.formChain(dominoesArray);\n+\t\t\n+\t\tassertNull(chain);\n+\t}\n+\t\n+\t@Ignore(\"Remove to run test\")\n+\t@Test\n+\tpublic void disconnectedSimpleTest() {\n+\t\tDominoes dominoes = new Dominoes();\n+\t\t\n+\t\tDomino[] dominoesList = {new Domino(1, 1), new Domino(2, 2)};\n+\t\tArrayList<Domino> dominoesArray = new ArrayList<>(Arrays.asList(dominoesList));\n+\t\t\n+\t\tArrayList<Domino> chain = dominoes.formChain(dominoesArray);\n+\t\t\n+\t\tassertNull(chain);\n+\t}\n+\t\n+\t@Ignore(\"Remove to run test\")\n+\t@Test\n+\tpublic void disconnectedDoubleLoopTest() {\n+\t\tDominoes dominoes = new Dominoes();\n+\t\t\n+\t\tDomino[] dominoesList = {new Domino(1, 2), new Domino(2, 1), new Domino(3, 4), new Domino(4, 3)};\n+\t\tArrayList<Domino> dominoesArray = new ArrayList<>(Arrays.asList(dominoesList));\n+\t\t\n+\t\tArrayList<Domino> chain = dominoes.formChain(dominoesArray);\n+\t\t\n+\t\tassertNull(chain);\n+\t}\n+\t\n+\t@Ignore(\"Remove to run test\")\n+\t@Test\n+\tpublic void disconnectedSingleIsolatedTest() {\n+\t\tDominoes dominoes = new Dominoes();\n+\t\t\n+\t\tDomino[] dominoesList = {new Domino(1, 2), new Domino(2, 3), new Domino(3, 1), new Domino(4, 4)};\n+\t\tArrayList<Domino> dominoesArray = new ArrayList<>(Arrays.asList(dominoesList));\n+\t\t\n+\t\tArrayList<Domino> chain = dominoes.formChain(dominoesArray);\n+\t\t\n+\t\tassertNull(chain);\n+\t}\n+\t\n+\t@Ignore(\"Remove to run test\")\n+\t@Test\n+\tpublic void needBacktrackTest() {\n+\t\tDominoes dominoes = new Dominoes();\n+\t\t\n+\t\tDomino[] dominoesList = {new Domino(1, 2), new Domino(2, 3), new Domino(3, 1), new Domino(2, 4), new Domino(4, 2)};\n+\t\tArrayList<Domino> dominoesArray = new ArrayList<>(Arrays.asList(dominoesList));\n+\t\t\n+\t\tArrayList<Domino> chain = dominoes.formChain(dominoesArray);\n+\t\t\n+\t\tassertValidChain(dominoesArray, chain);\n+\t}\n+\t\n+\t@Ignore(\"Remove to run test\")\n+\t@Test\n+\tpublic void separateLoopsTest() {\n+\t\tDominoes dominoes = new Dominoes();\n+\t\t\n+\t\tDomino[] dominoesList = {new Domino(1, 2), new Domino(2, 3), new Domino(3, 1), new Domino(1, 1), new Domino(2, 2), new Domino(3, 3)};\n+\t\tArrayList<Domino> dominoesArray = new ArrayList<>(Arrays.asList(dominoesList));\n+\t\t\n+\t\tArrayList<Domino> chain = dominoes.formChain(dominoesArray);\n+\t\t\n+\t\tassertValidChain(dominoesArray, chain);\n+\t}\n+\t\n+\t@Ignore(\"Remove to run test\")\n+\t@Test\n+\tpublic void nineElementsTest() {\n+\t\tDominoes dominoes = new Dominoes();\n+\t\tDomino[] dominoesList = {new Domino(1, 2), new Domino(5, 3), new Domino(3, 1), new Domino(1, 2), new Domino(2, 4), new Domino(1, 6), new Domino(2, 3), new Domino(3, 4), new Domino(5, 6)};\n+\t\tArrayList<Domino> dominoesArray = new ArrayList<>(Arrays.asList(dominoesList));\n+\t\t\n+\t\tArrayList<Domino> chain = dominoes.formChain(dominoesArray);\n+\t\t\n+\t\tassertValidChain(dominoesArray, chain);\n+\t}\n+\t\n+\tprivate void assertValidChain(ArrayList<Domino> inputDominoes, ArrayList<Domino> outputDominoes) {\n+\t\tassertSameDominoes(inputDominoes, outputDominoes);\n+\t\tassertEndDominoesMatch(outputDominoes);\n+\t\tassertConsecutiveDominoes(outputDominoes);\n+\t}\n+\t\n+\tprivate void assertEndDominoesMatch(ArrayList<Domino> outputDominoes) {","path":"exercises/dominoes/src/test/java/DominoesTest.java","position":172,"original_position":172,"commit_id":"9cfe963f8db3f7fbef7f4b68f6c697323d4db189","original_commit_id":"9cfe963f8db3f7fbef7f4b68f6c697323d4db189","user":{"login":"FridaTveit","id":13311307,"avatar_url":"https://avatars1.githubusercontent.com/u/13311307?v=4","gravatar_id":"","url":"https://api.github.com/users/FridaTveit","html_url":"https://github.com/FridaTveit","followers_url":"https://api.github.com/users/FridaTveit/followers","following_url":"https://api.github.com/users/FridaTveit/following{/other_user}","gists_url":"https://api.github.com/users/FridaTveit/gists{/gist_id}","starred_url":"https://api.github.com/users/FridaTveit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FridaTveit/subscriptions","organizations_url":"https://api.github.com/users/FridaTveit/orgs","repos_url":"https://api.github.com/users/FridaTveit/repos","events_url":"https://api.github.com/users/FridaTveit/events{/privacy}","received_events_url":"https://api.github.com/users/FridaTveit/received_events","type":"User","site_admin":false},"body":"For this and the other two helper methods it might be useful to provide a useful error message to assertEquals? Otherwise the user will just get a message along the lines of `Expected 3 but got 4`. Which isn't very useful. The error message should contain all the details the user needs to see exactly what's gone wrong 🙂 ","created_at":"2018-03-19T16:29:32Z","updated_at":"2018-03-19T16:31:48Z","html_url":"https://github.com/exercism/java/pull/1379#discussion_r175498986","pull_request_url":"https://api.github.com/repos/exercism/java/pulls/1379","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/exercism/java/pulls/comments/175498986"},"html":{"href":"https://github.com/exercism/java/pull/1379#discussion_r175498986"},"pull_request":{"href":"https://api.github.com/repos/exercism/java/pulls/1379"}}},"pull_request":{"url":"https://api.github.com/repos/exercism/java/pulls/1379","id":175357209,"html_url":"https://github.com/exercism/java/pull/1379","diff_url":"https://github.com/exercism/java/pull/1379.diff","patch_url":"https://github.com/exercism/java/pull/1379.patch","issue_url":"https://api.github.com/repos/exercism/java/issues/1379","number":1379,"state":"open","locked":false,"title":"dominoes: add new exercise","user":{"login":"jssander","id":3003373,"avatar_url":"https://avatars0.githubusercontent.com/u/3003373?v=4","gravatar_id":"","url":"https://api.github.com/users/jssander","html_url":"https://github.com/jssander","followers_url":"https://api.github.com/users/jssander/followers","following_url":"https://api.github.com/users/jssander/following{/other_user}","gists_url":"https://api.github.com/users/jssander/gists{/gist_id}","starred_url":"https://api.github.com/users/jssander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jssander/subscriptions","organizations_url":"https://api.github.com/users/jssander/orgs","repos_url":"https://api.github.com/users/jssander/repos","events_url":"https://api.github.com/users/jssander/events{/privacy}","received_events_url":"https://api.github.com/users/jssander/received_events","type":"User","site_admin":false},"body":"This is what I have so far for the dominoes exercise. I haven't done config.json or the readme yet.\r\n---\r\n\r\nReviewer Resources:\r\n\r\n[Track Policies](https://github.com/exercism/java/blob/master/POLICIES.md#event-checklist)\r\n","created_at":"2018-03-15T19:34:34Z","updated_at":"2018-03-19T16:31:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fdc5c9c402419f95f11a1764f9a088f97e1c5c7a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/exercism/java/pulls/1379/commits","review_comments_url":"https://api.github.com/repos/exercism/java/pulls/1379/comments","review_comment_url":"https://api.github.com/repos/exercism/java/pulls/comments{/number}","comments_url":"https://api.github.com/repos/exercism/java/issues/1379/comments","statuses_url":"https://api.github.com/repos/exercism/java/statuses/9cfe963f8db3f7fbef7f4b68f6c697323d4db189","head":{"label":"jssander:new-dominoes","ref":"new-dominoes","sha":"9cfe963f8db3f7fbef7f4b68f6c697323d4db189","user":{"login":"jssander","id":3003373,"avatar_url":"https://avatars0.githubusercontent.com/u/3003373?v=4","gravatar_id":"","url":"https://api.github.com/users/jssander","html_url":"https://github.com/jssander","followers_url":"https://api.github.com/users/jssander/followers","following_url":"https://api.github.com/users/jssander/following{/other_user}","gists_url":"https://api.github.com/users/jssander/gists{/gist_id}","starred_url":"https://api.github.com/users/jssander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jssander/subscriptions","organizations_url":"https://api.github.com/users/jssander/orgs","repos_url":"https://api.github.com/users/jssander/repos","events_url":"https://api.github.com/users/jssander/events{/privacy}","received_events_url":"https://api.github.com/users/jssander/received_events","type":"User","site_admin":false},"repo":{"id":118671126,"name":"java","full_name":"jssander/java","owner":{"login":"jssander","id":3003373,"avatar_url":"https://avatars0.githubusercontent.com/u/3003373?v=4","gravatar_id":"","url":"https://api.github.com/users/jssander","html_url":"https://github.com/jssander","followers_url":"https://api.github.com/users/jssander/followers","following_url":"https://api.github.com/users/jssander/following{/other_user}","gists_url":"https://api.github.com/users/jssander/gists{/gist_id}","starred_url":"https://api.github.com/users/jssander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jssander/subscriptions","organizations_url":"https://api.github.com/users/jssander/orgs","repos_url":"https://api.github.com/users/jssander/repos","events_url":"https://api.github.com/users/jssander/events{/privacy}","received_events_url":"https://api.github.com/users/jssander/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jssander/java","description":"Exercism exercises in Java.","fork":true,"url":"https://api.github.com/repos/jssander/java","forks_url":"https://api.github.com/repos/jssander/java/forks","keys_url":"https://api.github.com/repos/jssander/java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jssander/java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jssander/java/teams","hooks_url":"https://api.github.com/repos/jssander/java/hooks","issue_events_url":"https://api.github.com/repos/jssander/java/issues/events{/number}","events_url":"https://api.github.com/repos/jssander/java/events","assignees_url":"https://api.github.com/repos/jssander/java/assignees{/user}","branches_url":"https://api.github.com/repos/jssander/java/branches{/branch}","tags_url":"https://api.github.com/repos/jssander/java/tags","blobs_url":"https://api.github.com/repos/jssander/java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jssander/java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jssander/java/git/refs{/sha}","trees_url":"https://api.github.com/repos/jssander/java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jssander/java/statuses/{sha}","languages_url":"https://api.github.com/repos/jssander/java/languages","stargazers_url":"https://api.github.com/repos/jssander/java/stargazers","contributors_url":"https://api.github.com/repos/jssander/java/contributors","subscribers_url":"https://api.github.com/repos/jssander/java/subscribers","subscription_url":"https://api.github.com/repos/jssander/java/subscription","commits_url":"https://api.github.com/repos/jssander/java/commits{/sha}","git_commits_url":"https://api.github.com/repos/jssander/java/git/commits{/sha}","comments_url":"https://api.github.com/repos/jssander/java/comments{/number}","issue_comment_url":"https://api.github.com/repos/jssander/java/issues/comments{/number}","contents_url":"https://api.github.com/repos/jssander/java/contents/{+path}","compare_url":"https://api.github.com/repos/jssander/java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jssander/java/merges","archive_url":"https://api.github.com/repos/jssander/java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jssander/java/downloads","issues_url":"https://api.github.com/repos/jssander/java/issues{/number}","pulls_url":"https://api.github.com/repos/jssander/java/pulls{/number}","milestones_url":"https://api.github.com/repos/jssander/java/milestones{/number}","notifications_url":"https://api.github.com/repos/jssander/java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jssander/java/labels{/name}","releases_url":"https://api.github.com/repos/jssander/java/releases{/id}","deployments_url":"https://api.github.com/repos/jssander/java/deployments","created_at":"2018-01-23T21:18:14Z","updated_at":"2018-01-23T21:18:16Z","pushed_at":"2018-03-19T15:35:59Z","git_url":"git://github.com/jssander/java.git","ssh_url":"git@github.com:jssander/java.git","clone_url":"https://github.com/jssander/java.git","svn_url":"https://github.com/jssander/java","homepage":"http://exercism.io/languages/java","size":2196,"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":"exercism:master","ref":"master","sha":"67de6e40914196fcc81e37e8ff96857e2f9b1af3","user":{"login":"exercism","id":5624255,"avatar_url":"https://avatars0.githubusercontent.com/u/5624255?v=4","gravatar_id":"","url":"https://api.github.com/users/exercism","html_url":"https://github.com/exercism","followers_url":"https://api.github.com/users/exercism/followers","following_url":"https://api.github.com/users/exercism/following{/other_user}","gists_url":"https://api.github.com/users/exercism/gists{/gist_id}","starred_url":"https://api.github.com/users/exercism/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exercism/subscriptions","organizations_url":"https://api.github.com/users/exercism/orgs","repos_url":"https://api.github.com/users/exercism/repos","events_url":"https://api.github.com/users/exercism/events{/privacy}","received_events_url":"https://api.github.com/users/exercism/received_events","type":"Organization","site_admin":false},"repo":{"id":17270540,"name":"java","full_name":"exercism/java","owner":{"login":"exercism","id":5624255,"avatar_url":"https://avatars0.githubusercontent.com/u/5624255?v=4","gravatar_id":"","url":"https://api.github.com/users/exercism","html_url":"https://github.com/exercism","followers_url":"https://api.github.com/users/exercism/followers","following_url":"https://api.github.com/users/exercism/following{/other_user}","gists_url":"https://api.github.com/users/exercism/gists{/gist_id}","starred_url":"https://api.github.com/users/exercism/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exercism/subscriptions","organizations_url":"https://api.github.com/users/exercism/orgs","repos_url":"https://api.github.com/users/exercism/repos","events_url":"https://api.github.com/users/exercism/events{/privacy}","received_events_url":"https://api.github.com/users/exercism/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/exercism/java","description":"Exercism exercises in Java.","fork":false,"url":"https://api.github.com/repos/exercism/java","forks_url":"https://api.github.com/repos/exercism/java/forks","keys_url":"https://api.github.com/repos/exercism/java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/exercism/java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/exercism/java/teams","hooks_url":"https://api.github.com/repos/exercism/java/hooks","issue_events_url":"https://api.github.com/repos/exercism/java/issues/events{/number}","events_url":"https://api.github.com/repos/exercism/java/events","assignees_url":"https://api.github.com/repos/exercism/java/assignees{/user}","branches_url":"https://api.github.com/repos/exercism/java/branches{/branch}","tags_url":"https://api.github.com/repos/exercism/java/tags","blobs_url":"https://api.github.com/repos/exercism/java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/exercism/java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/exercism/java/git/refs{/sha}","trees_url":"https://api.github.com/repos/exercism/java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/exercism/java/statuses/{sha}","languages_url":"https://api.github.com/repos/exercism/java/languages","stargazers_url":"https://api.github.com/repos/exercism/java/stargazers","contributors_url":"https://api.github.com/repos/exercism/java/contributors","subscribers_url":"https://api.github.com/repos/exercism/java/subscribers","subscription_url":"https://api.github.com/repos/exercism/java/subscription","commits_url":"https://api.github.com/repos/exercism/java/commits{/sha}","git_commits_url":"https://api.github.com/repos/exercism/java/git/commits{/sha}","comments_url":"https://api.github.com/repos/exercism/java/comments{/number}","issue_comment_url":"https://api.github.com/repos/exercism/java/issues/comments{/number}","contents_url":"https://api.github.com/repos/exercism/java/contents/{+path}","compare_url":"https://api.github.com/repos/exercism/java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/exercism/java/merges","archive_url":"https://api.github.com/repos/exercism/java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/exercism/java/downloads","issues_url":"https://api.github.com/repos/exercism/java/issues{/number}","pulls_url":"https://api.github.com/repos/exercism/java/pulls{/number}","milestones_url":"https://api.github.com/repos/exercism/java/milestones{/number}","notifications_url":"https://api.github.com/repos/exercism/java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/exercism/java/labels{/name}","releases_url":"https://api.github.com/repos/exercism/java/releases{/id}","deployments_url":"https://api.github.com/repos/exercism/java/deployments","created_at":"2014-02-28T00:45:13Z","updated_at":"2018-03-19T15:00:54Z","pushed_at":"2018-03-19T15:36:00Z","git_url":"git://github.com/exercism/java.git","ssh_url":"git@github.com:exercism/java.git","clone_url":"https://github.com/exercism/java.git","svn_url":"https://github.com/exercism/java","homepage":"http://exercism.io/languages/java","size":2181,"stargazers_count":180,"watchers_count":180,"language":"Java","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":228,"mirror_url":null,"archived":false,"open_issues_count":29,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":228,"open_issues":29,"watchers":180,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/exercism/java/pulls/1379"},"html":{"href":"https://github.com/exercism/java/pull/1379"},"issue":{"href":"https://api.github.com/repos/exercism/java/issues/1379"},"comments":{"href":"https://api.github.com/repos/exercism/java/issues/1379/comments"},"review_comments":{"href":"https://api.github.com/repos/exercism/java/pulls/1379/comments"},"review_comment":{"href":"https://api.github.com/repos/exercism/java/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/exercism/java/pulls/1379/commits"},"statuses":{"href":"https://api.github.com/repos/exercism/java/statuses/9cfe963f8db3f7fbef7f4b68f6c697323d4db189"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"FridaTveit"}}