{"action":"created","comment":{"url":"https://api.github.com/repos/47deg/scala-exercises/pulls/comments/55375103","id":55375103,"diff_hunk":"@@ -0,0 +1,184 @@\n+package exercises\n+\n+import stdlib._\n+import shapeless.HNil\n+\n+import org.scalatest.Spec\n+import org.scalatest.prop.Checkers\n+\n+// FIXME: get rid of this if possible\n+import org.scalacheck.Shapeless._\n+\n+class AssertsSpec extends Spec with Checkers {\n+  def `scalatest asserts` = {\n+    check(Test.success(Asserts.scalaTestAsserts _, true :: HNil))\n+  }\n+\n+  // FIXME: depends on #259\n+  // check(success(Asserts.booleansAsserts _, HNil))\n+\n+  def `values asserts` = {\n+    check(Test.success(Asserts.valuesAsserts _, 2 :: HNil))\n+  }\n+}\n+\n+class ByNameParameterSpec extends Spec with Checkers {\n+  def `takes unit by name parameter` = {\n+    val right: Either[Throwable, Int] = Right(29)\n+\n+    check(\n+      Test.success(\n+        ByNameParameter.takesUnitByNameParameter _,\n+        right :: HNil\n+      )\n+    )\n+  }\n+\n+  def `takes parameters by name` = {\n+    val right: Either[Throwable, Int] = Right(69)\n+\n+    check(\n+      Test.success(\n+        ByNameParameter.byNameParameter _,\n+        right :: HNil\n+      )\n+    )\n+  }\n+\n+  def `apply parameters` = {\n+    check(\n+      Test.success(\n+        ByNameParameter.withApplyByNameParameter _,\n+        \"retzelpay\" :: HNil\n+      )\n+    )\n+  }\n+}\n+\n+class CaseClassesSpec extends Spec with Checkers {\n+  def `case classes comparisons` = {\n+    check(\n+      Test.success(\n+        CaseClasses.caseClassesSupportEquality _,\n+        false :: true :: false :: false :: HNil\n+      )\n+    )\n+  }\n+\n+  def `hash codes` = {\n+    check(\n+      Test.success(\n+        CaseClasses.hashcodeMethodCaseClasses _,\n+        false :: true :: HNil\n+      )\n+    )\n+  }\n+\n+  def `case class creation` = {\n+    check(\n+      Test.success(\n+        CaseClasses.creationCaseClasses _,\n+        true :: false :: false :: HNil\n+      )\n+    )\n+  }\n+\n+  def `to string method` = {\n+    check(\n+      Test.success(\n+        CaseClasses.toStringMethodCaseClasses _,\n+        \"Dog(Scooby,Doberman)\" :: HNil\n+      )\n+    )\n+  }\n+\n+  def `properties` = {\n+    check(\n+      Test.success(\n+        CaseClasses.propertiesCaseClasses _,\n+        \"Scooby\" :: \"Doberman\" :: HNil\n+      )\n+    )\n+  }\n+\n+  def `mutable properties` = {\n+    check(\n+      Test.success(\n+        CaseClasses.mutablePropertiesCaseClasses _,\n+        \"Scooby\" :: \"Doberman\" :: \"Scooby Doo\" :: \"Doberman\" :: HNil\n+      )\n+    )\n+  }\n+\n+  def `altering case classes` = {\n+    check(\n+      Test.success(\n+        CaseClasses.alteringCaseClasses _,\n+        \"Scooby\" :: \"Doberman\" :: \"Scooby Doo\" :: \"Doberman\" :: HNil\n+      )\n+    )\n+  }\n+\n+  // FIXME: Shapeless doesn't find an implicit FnToProduct.Aux, why?","path":"site/content/src/test/scala/exercises/stdlib/AssertsSpec.scala","position":122,"original_position":122,"commit_id":"791cb481d70f97a00557b1c8555285380684dec5","original_commit_id":"791cb481d70f97a00557b1c8555285380684dec5","user":{"login":"raulraja","id":456796,"avatar_url":"https://avatars.githubusercontent.com/u/456796?v=3","gravatar_id":"","url":"https://api.github.com/users/raulraja","html_url":"https://github.com/raulraja","followers_url":"https://api.github.com/users/raulraja/followers","following_url":"https://api.github.com/users/raulraja/following{/other_user}","gists_url":"https://api.github.com/users/raulraja/gists{/gist_id}","starred_url":"https://api.github.com/users/raulraja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raulraja/subscriptions","organizations_url":"https://api.github.com/users/raulraja/orgs","repos_url":"https://api.github.com/users/raulraja/repos","events_url":"https://api.github.com/users/raulraja/events{/privacy}","received_events_url":"https://api.github.com/users/raulraja/received_events","type":"User","site_admin":false},"body":"We should ask in the shapeless gitter","created_at":"2016-03-08T15:31:48Z","updated_at":"2016-03-08T15:31:48Z","html_url":"https://github.com/47deg/scala-exercises/pull/292#discussion_r55375103","pull_request_url":"https://api.github.com/repos/47deg/scala-exercises/pulls/292","_links":{"self":{"href":"https://api.github.com/repos/47deg/scala-exercises/pulls/comments/55375103"},"html":{"href":"https://github.com/47deg/scala-exercises/pull/292#discussion_r55375103"},"pull_request":{"href":"https://api.github.com/repos/47deg/scala-exercises/pulls/292"}}},"pull_request":{"url":"https://api.github.com/repos/47deg/scala-exercises/pulls/292","id":62059096,"html_url":"https://github.com/47deg/scala-exercises/pull/292","diff_url":"https://github.com/47deg/scala-exercises/pull/292.diff","patch_url":"https://github.com/47deg/scala-exercises/pull/292.patch","issue_url":"https://api.github.com/repos/47deg/scala-exercises/issues/292","number":292,"state":"open","locked":false,"title":"Generic way of testing exercises providing the right answer","user":{"login":"dialelo","id":409039,"avatar_url":"https://avatars.githubusercontent.com/u/409039?v=3","gravatar_id":"","url":"https://api.github.com/users/dialelo","html_url":"https://github.com/dialelo","followers_url":"https://api.github.com/users/dialelo/followers","following_url":"https://api.github.com/users/dialelo/following{/other_user}","gists_url":"https://api.github.com/users/dialelo/gists{/gist_id}","starred_url":"https://api.github.com/users/dialelo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dialelo/subscriptions","organizations_url":"https://api.github.com/users/dialelo/orgs","repos_url":"https://api.github.com/users/dialelo/repos","events_url":"https://api.github.com/users/dialelo/events{/privacy}","received_events_url":"https://api.github.com/users/dialelo/received_events","type":"User","site_admin":false},"body":"- [ ] Find a generic approach that we like (pending of review)\r\n- [ ] Add tests for every exercise\r\n\r\n@raulraja @rafaparadela @juanpedromoreno @andyscott opening this for review, I quite like the current approach but I'd like to have some feedback. I'm going to move forward and start writing tests for the stdlib exercises.","created_at":"2016-03-08T11:34:27Z","updated_at":"2016-03-08T15:31:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7c1d08e22785e7c22fef9e4f52964b89b0c7c053","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/47deg/scala-exercises/pulls/292/commits","review_comments_url":"https://api.github.com/repos/47deg/scala-exercises/pulls/292/comments","review_comment_url":"https://api.github.com/repos/47deg/scala-exercises/pulls/comments{/number}","comments_url":"https://api.github.com/repos/47deg/scala-exercises/issues/292/comments","statuses_url":"https://api.github.com/repos/47deg/scala-exercises/statuses/791cb481d70f97a00557b1c8555285380684dec5","head":{"label":"47deg:al-test-exercises","ref":"al-test-exercises","sha":"791cb481d70f97a00557b1c8555285380684dec5","user":{"login":"47deg","id":479857,"avatar_url":"https://avatars.githubusercontent.com/u/479857?v=3","gravatar_id":"","url":"https://api.github.com/users/47deg","html_url":"https://github.com/47deg","followers_url":"https://api.github.com/users/47deg/followers","following_url":"https://api.github.com/users/47deg/following{/other_user}","gists_url":"https://api.github.com/users/47deg/gists{/gist_id}","starred_url":"https://api.github.com/users/47deg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/47deg/subscriptions","organizations_url":"https://api.github.com/users/47deg/orgs","repos_url":"https://api.github.com/users/47deg/repos","events_url":"https://api.github.com/users/47deg/events{/privacy}","received_events_url":"https://api.github.com/users/47deg/received_events","type":"Organization","site_admin":false},"repo":{"id":23613922,"name":"scala-exercises","full_name":"47deg/scala-exercises","owner":{"login":"47deg","id":479857,"avatar_url":"https://avatars.githubusercontent.com/u/479857?v=3","gravatar_id":"","url":"https://api.github.com/users/47deg","html_url":"https://github.com/47deg","followers_url":"https://api.github.com/users/47deg/followers","following_url":"https://api.github.com/users/47deg/following{/other_user}","gists_url":"https://api.github.com/users/47deg/gists{/gist_id}","starred_url":"https://api.github.com/users/47deg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/47deg/subscriptions","organizations_url":"https://api.github.com/users/47deg/orgs","repos_url":"https://api.github.com/users/47deg/repos","events_url":"https://api.github.com/users/47deg/events{/privacy}","received_events_url":"https://api.github.com/users/47deg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/47deg/scala-exercises","description":"The easy way to learn Scala.","fork":false,"url":"https://api.github.com/repos/47deg/scala-exercises","forks_url":"https://api.github.com/repos/47deg/scala-exercises/forks","keys_url":"https://api.github.com/repos/47deg/scala-exercises/keys{/key_id}","collaborators_url":"https://api.github.com/repos/47deg/scala-exercises/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/47deg/scala-exercises/teams","hooks_url":"https://api.github.com/repos/47deg/scala-exercises/hooks","issue_events_url":"https://api.github.com/repos/47deg/scala-exercises/issues/events{/number}","events_url":"https://api.github.com/repos/47deg/scala-exercises/events","assignees_url":"https://api.github.com/repos/47deg/scala-exercises/assignees{/user}","branches_url":"https://api.github.com/repos/47deg/scala-exercises/branches{/branch}","tags_url":"https://api.github.com/repos/47deg/scala-exercises/tags","blobs_url":"https://api.github.com/repos/47deg/scala-exercises/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/47deg/scala-exercises/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/47deg/scala-exercises/git/refs{/sha}","trees_url":"https://api.github.com/repos/47deg/scala-exercises/git/trees{/sha}","statuses_url":"https://api.github.com/repos/47deg/scala-exercises/statuses/{sha}","languages_url":"https://api.github.com/repos/47deg/scala-exercises/languages","stargazers_url":"https://api.github.com/repos/47deg/scala-exercises/stargazers","contributors_url":"https://api.github.com/repos/47deg/scala-exercises/contributors","subscribers_url":"https://api.github.com/repos/47deg/scala-exercises/subscribers","subscription_url":"https://api.github.com/repos/47deg/scala-exercises/subscription","commits_url":"https://api.github.com/repos/47deg/scala-exercises/commits{/sha}","git_commits_url":"https://api.github.com/repos/47deg/scala-exercises/git/commits{/sha}","comments_url":"https://api.github.com/repos/47deg/scala-exercises/comments{/number}","issue_comment_url":"https://api.github.com/repos/47deg/scala-exercises/issues/comments{/number}","contents_url":"https://api.github.com/repos/47deg/scala-exercises/contents/{+path}","compare_url":"https://api.github.com/repos/47deg/scala-exercises/compare/{base}...{head}","merges_url":"https://api.github.com/repos/47deg/scala-exercises/merges","archive_url":"https://api.github.com/repos/47deg/scala-exercises/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/47deg/scala-exercises/downloads","issues_url":"https://api.github.com/repos/47deg/scala-exercises/issues{/number}","pulls_url":"https://api.github.com/repos/47deg/scala-exercises/pulls{/number}","milestones_url":"https://api.github.com/repos/47deg/scala-exercises/milestones{/number}","notifications_url":"https://api.github.com/repos/47deg/scala-exercises/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/47deg/scala-exercises/labels{/name}","releases_url":"https://api.github.com/repos/47deg/scala-exercises/releases{/id}","deployments_url":"https://api.github.com/repos/47deg/scala-exercises/deployments","created_at":"2014-09-03T09:14:41Z","updated_at":"2016-03-07T19:23:11Z","pushed_at":"2016-03-08T14:50:01Z","git_url":"git://github.com/47deg/scala-exercises.git","ssh_url":"git@github.com:47deg/scala-exercises.git","clone_url":"https://github.com/47deg/scala-exercises.git","svn_url":"https://github.com/47deg/scala-exercises","homepage":"http://scala-exercises.47deg.com","size":9071,"stargazers_count":327,"watchers_count":327,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":160,"mirror_url":null,"open_issues_count":19,"forks":160,"open_issues":19,"watchers":327,"default_branch":"master"}},"base":{"label":"47deg:master","ref":"master","sha":"f04fb0663784aab5041edba98206263bad72b5b2","user":{"login":"47deg","id":479857,"avatar_url":"https://avatars.githubusercontent.com/u/479857?v=3","gravatar_id":"","url":"https://api.github.com/users/47deg","html_url":"https://github.com/47deg","followers_url":"https://api.github.com/users/47deg/followers","following_url":"https://api.github.com/users/47deg/following{/other_user}","gists_url":"https://api.github.com/users/47deg/gists{/gist_id}","starred_url":"https://api.github.com/users/47deg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/47deg/subscriptions","organizations_url":"https://api.github.com/users/47deg/orgs","repos_url":"https://api.github.com/users/47deg/repos","events_url":"https://api.github.com/users/47deg/events{/privacy}","received_events_url":"https://api.github.com/users/47deg/received_events","type":"Organization","site_admin":false},"repo":{"id":23613922,"name":"scala-exercises","full_name":"47deg/scala-exercises","owner":{"login":"47deg","id":479857,"avatar_url":"https://avatars.githubusercontent.com/u/479857?v=3","gravatar_id":"","url":"https://api.github.com/users/47deg","html_url":"https://github.com/47deg","followers_url":"https://api.github.com/users/47deg/followers","following_url":"https://api.github.com/users/47deg/following{/other_user}","gists_url":"https://api.github.com/users/47deg/gists{/gist_id}","starred_url":"https://api.github.com/users/47deg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/47deg/subscriptions","organizations_url":"https://api.github.com/users/47deg/orgs","repos_url":"https://api.github.com/users/47deg/repos","events_url":"https://api.github.com/users/47deg/events{/privacy}","received_events_url":"https://api.github.com/users/47deg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/47deg/scala-exercises","description":"The easy way to learn Scala.","fork":false,"url":"https://api.github.com/repos/47deg/scala-exercises","forks_url":"https://api.github.com/repos/47deg/scala-exercises/forks","keys_url":"https://api.github.com/repos/47deg/scala-exercises/keys{/key_id}","collaborators_url":"https://api.github.com/repos/47deg/scala-exercises/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/47deg/scala-exercises/teams","hooks_url":"https://api.github.com/repos/47deg/scala-exercises/hooks","issue_events_url":"https://api.github.com/repos/47deg/scala-exercises/issues/events{/number}","events_url":"https://api.github.com/repos/47deg/scala-exercises/events","assignees_url":"https://api.github.com/repos/47deg/scala-exercises/assignees{/user}","branches_url":"https://api.github.com/repos/47deg/scala-exercises/branches{/branch}","tags_url":"https://api.github.com/repos/47deg/scala-exercises/tags","blobs_url":"https://api.github.com/repos/47deg/scala-exercises/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/47deg/scala-exercises/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/47deg/scala-exercises/git/refs{/sha}","trees_url":"https://api.github.com/repos/47deg/scala-exercises/git/trees{/sha}","statuses_url":"https://api.github.com/repos/47deg/scala-exercises/statuses/{sha}","languages_url":"https://api.github.com/repos/47deg/scala-exercises/languages","stargazers_url":"https://api.github.com/repos/47deg/scala-exercises/stargazers","contributors_url":"https://api.github.com/repos/47deg/scala-exercises/contributors","subscribers_url":"https://api.github.com/repos/47deg/scala-exercises/subscribers","subscription_url":"https://api.github.com/repos/47deg/scala-exercises/subscription","commits_url":"https://api.github.com/repos/47deg/scala-exercises/commits{/sha}","git_commits_url":"https://api.github.com/repos/47deg/scala-exercises/git/commits{/sha}","comments_url":"https://api.github.com/repos/47deg/scala-exercises/comments{/number}","issue_comment_url":"https://api.github.com/repos/47deg/scala-exercises/issues/comments{/number}","contents_url":"https://api.github.com/repos/47deg/scala-exercises/contents/{+path}","compare_url":"https://api.github.com/repos/47deg/scala-exercises/compare/{base}...{head}","merges_url":"https://api.github.com/repos/47deg/scala-exercises/merges","archive_url":"https://api.github.com/repos/47deg/scala-exercises/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/47deg/scala-exercises/downloads","issues_url":"https://api.github.com/repos/47deg/scala-exercises/issues{/number}","pulls_url":"https://api.github.com/repos/47deg/scala-exercises/pulls{/number}","milestones_url":"https://api.github.com/repos/47deg/scala-exercises/milestones{/number}","notifications_url":"https://api.github.com/repos/47deg/scala-exercises/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/47deg/scala-exercises/labels{/name}","releases_url":"https://api.github.com/repos/47deg/scala-exercises/releases{/id}","deployments_url":"https://api.github.com/repos/47deg/scala-exercises/deployments","created_at":"2014-09-03T09:14:41Z","updated_at":"2016-03-07T19:23:11Z","pushed_at":"2016-03-08T14:50:01Z","git_url":"git://github.com/47deg/scala-exercises.git","ssh_url":"git@github.com:47deg/scala-exercises.git","clone_url":"https://github.com/47deg/scala-exercises.git","svn_url":"https://github.com/47deg/scala-exercises","homepage":"http://scala-exercises.47deg.com","size":9071,"stargazers_count":327,"watchers_count":327,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":160,"mirror_url":null,"open_issues_count":19,"forks":160,"open_issues":19,"watchers":327,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/47deg/scala-exercises/pulls/292"},"html":{"href":"https://github.com/47deg/scala-exercises/pull/292"},"issue":{"href":"https://api.github.com/repos/47deg/scala-exercises/issues/292"},"comments":{"href":"https://api.github.com/repos/47deg/scala-exercises/issues/292/comments"},"review_comments":{"href":"https://api.github.com/repos/47deg/scala-exercises/pulls/292/comments"},"review_comment":{"href":"https://api.github.com/repos/47deg/scala-exercises/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/47deg/scala-exercises/pulls/292/commits"},"statuses":{"href":"https://api.github.com/repos/47deg/scala-exercises/statuses/791cb481d70f97a00557b1c8555285380684dec5"}}}}