{"action":"created","comment":{"url":"https://api.github.com/repos/hmrc/fset-faststream/pulls/comments/84263281","pull_request_review_id":5050634,"id":84263281,"diff_hunk":"@@ -0,0 +1,31 @@\n+/*\n+ * Copyright 2016 HM Revenue & Customs\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *     http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+package repositories\n+\n+import org.scalatest._\n+import org.scalatestplus.play.PlaySpec\n+\n+class RandomSelectionSpec extends PlaySpec {\n+  \"RandomSelection\" should {\n+    \"calculate the correct batch size and random offset\" in {\n+      RandomSelection.calculateBatchSize(1, 1) mustBe (0,1)\n+      val (offset, size) = RandomSelection.calculateBatchSize(1, 9)\n+      offset mustBe (0 +- 8)","path":"test/repositories/RandomSelectionSpec.scala","position":27,"original_position":27,"commit_id":"7a1cbf6057796f5f2c8793a00622a30f4f39f611","original_commit_id":"7a1cbf6057796f5f2c8793a00622a30f4f39f611","user":{"login":"ollyw","id":632442,"avatar_url":"https://avatars.githubusercontent.com/u/632442?v=3","gravatar_id":"","url":"https://api.github.com/users/ollyw","html_url":"https://github.com/ollyw","followers_url":"https://api.github.com/users/ollyw/followers","following_url":"https://api.github.com/users/ollyw/following{/other_user}","gists_url":"https://api.github.com/users/ollyw/gists{/gist_id}","starred_url":"https://api.github.com/users/ollyw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ollyw/subscriptions","organizations_url":"https://api.github.com/users/ollyw/orgs","repos_url":"https://api.github.com/users/ollyw/repos","events_url":"https://api.github.com/users/ollyw/events{/privacy}","received_events_url":"https://api.github.com/users/ollyw/received_events","type":"User","site_admin":false},"body":"This allows -8, which is not what you wanted. Suggest `offset must (be >= (0) and be <= (8))`\r\nIn addition, this test should be run multiple times, as you are only testing a single number. Suggest using the property testing trait. http://www.scalatest.org/user_guide/property_based_testing","created_at":"2016-10-20T11:35:06Z","updated_at":"2016-10-20T11:35:06Z","html_url":"https://github.com/hmrc/fset-faststream/pull/137#discussion_r84263281","pull_request_url":"https://api.github.com/repos/hmrc/fset-faststream/pulls/137","_links":{"self":{"href":"https://api.github.com/repos/hmrc/fset-faststream/pulls/comments/84263281"},"html":{"href":"https://github.com/hmrc/fset-faststream/pull/137#discussion_r84263281"},"pull_request":{"href":"https://api.github.com/repos/hmrc/fset-faststream/pulls/137"}}},"pull_request":{"url":"https://api.github.com/repos/hmrc/fset-faststream/pulls/137","id":90179446,"html_url":"https://github.com/hmrc/fset-faststream/pull/137","diff_url":"https://github.com/hmrc/fset-faststream/pull/137.diff","patch_url":"https://github.com/hmrc/fset-faststream/pull/137.patch","issue_url":"https://api.github.com/repos/hmrc/fset-faststream/issues/137","number":137,"state":"open","locked":false,"title":"Tests for the batch size logic in RandomSelection","user":{"login":"benjstephenson","id":3603151,"avatar_url":"https://avatars.githubusercontent.com/u/3603151?v=3","gravatar_id":"","url":"https://api.github.com/users/benjstephenson","html_url":"https://github.com/benjstephenson","followers_url":"https://api.github.com/users/benjstephenson/followers","following_url":"https://api.github.com/users/benjstephenson/following{/other_user}","gists_url":"https://api.github.com/users/benjstephenson/gists{/gist_id}","starred_url":"https://api.github.com/users/benjstephenson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjstephenson/subscriptions","organizations_url":"https://api.github.com/users/benjstephenson/orgs","repos_url":"https://api.github.com/users/benjstephenson/repos","events_url":"https://api.github.com/users/benjstephenson/events{/privacy}","received_events_url":"https://api.github.com/users/benjstephenson/received_events","type":"User","site_admin":false},"body":"Fix unit future return in evaluate phase 1 service spec.","created_at":"2016-10-20T11:12:45Z","updated_at":"2016-10-20T11:35:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c89d4825386b53042288ac60a08bcb50ef3be2a4","assignee":{"login":"ollyw","id":632442,"avatar_url":"https://avatars.githubusercontent.com/u/632442?v=3","gravatar_id":"","url":"https://api.github.com/users/ollyw","html_url":"https://github.com/ollyw","followers_url":"https://api.github.com/users/ollyw/followers","following_url":"https://api.github.com/users/ollyw/following{/other_user}","gists_url":"https://api.github.com/users/ollyw/gists{/gist_id}","starred_url":"https://api.github.com/users/ollyw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ollyw/subscriptions","organizations_url":"https://api.github.com/users/ollyw/orgs","repos_url":"https://api.github.com/users/ollyw/repos","events_url":"https://api.github.com/users/ollyw/events{/privacy}","received_events_url":"https://api.github.com/users/ollyw/received_events","type":"User","site_admin":false},"assignees":[{"login":"ollyw","id":632442,"avatar_url":"https://avatars.githubusercontent.com/u/632442?v=3","gravatar_id":"","url":"https://api.github.com/users/ollyw","html_url":"https://github.com/ollyw","followers_url":"https://api.github.com/users/ollyw/followers","following_url":"https://api.github.com/users/ollyw/following{/other_user}","gists_url":"https://api.github.com/users/ollyw/gists{/gist_id}","starred_url":"https://api.github.com/users/ollyw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ollyw/subscriptions","organizations_url":"https://api.github.com/users/ollyw/orgs","repos_url":"https://api.github.com/users/ollyw/repos","events_url":"https://api.github.com/users/ollyw/events{/privacy}","received_events_url":"https://api.github.com/users/ollyw/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/hmrc/fset-faststream/pulls/137/commits","review_comments_url":"https://api.github.com/repos/hmrc/fset-faststream/pulls/137/comments","review_comment_url":"https://api.github.com/repos/hmrc/fset-faststream/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hmrc/fset-faststream/issues/137/comments","statuses_url":"https://api.github.com/repos/hmrc/fset-faststream/statuses/7a1cbf6057796f5f2c8793a00622a30f4f39f611","head":{"label":"hmrc:random-selection-tests","ref":"random-selection-tests","sha":"7a1cbf6057796f5f2c8793a00622a30f4f39f611","user":{"login":"hmrc","id":5755339,"avatar_url":"https://avatars.githubusercontent.com/u/5755339?v=3","gravatar_id":"","url":"https://api.github.com/users/hmrc","html_url":"https://github.com/hmrc","followers_url":"https://api.github.com/users/hmrc/followers","following_url":"https://api.github.com/users/hmrc/following{/other_user}","gists_url":"https://api.github.com/users/hmrc/gists{/gist_id}","starred_url":"https://api.github.com/users/hmrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmrc/subscriptions","organizations_url":"https://api.github.com/users/hmrc/orgs","repos_url":"https://api.github.com/users/hmrc/repos","events_url":"https://api.github.com/users/hmrc/events{/privacy}","received_events_url":"https://api.github.com/users/hmrc/received_events","type":"Organization","site_admin":false},"repo":{"id":62889113,"name":"fset-faststream","full_name":"hmrc/fset-faststream","owner":{"login":"hmrc","id":5755339,"avatar_url":"https://avatars.githubusercontent.com/u/5755339?v=3","gravatar_id":"","url":"https://api.github.com/users/hmrc","html_url":"https://github.com/hmrc","followers_url":"https://api.github.com/users/hmrc/followers","following_url":"https://api.github.com/users/hmrc/following{/other_user}","gists_url":"https://api.github.com/users/hmrc/gists{/gist_id}","starred_url":"https://api.github.com/users/hmrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmrc/subscriptions","organizations_url":"https://api.github.com/users/hmrc/orgs","repos_url":"https://api.github.com/users/hmrc/repos","events_url":"https://api.github.com/users/hmrc/events{/privacy}","received_events_url":"https://api.github.com/users/hmrc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hmrc/fset-faststream","description":null,"fork":false,"url":"https://api.github.com/repos/hmrc/fset-faststream","forks_url":"https://api.github.com/repos/hmrc/fset-faststream/forks","keys_url":"https://api.github.com/repos/hmrc/fset-faststream/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hmrc/fset-faststream/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hmrc/fset-faststream/teams","hooks_url":"https://api.github.com/repos/hmrc/fset-faststream/hooks","issue_events_url":"https://api.github.com/repos/hmrc/fset-faststream/issues/events{/number}","events_url":"https://api.github.com/repos/hmrc/fset-faststream/events","assignees_url":"https://api.github.com/repos/hmrc/fset-faststream/assignees{/user}","branches_url":"https://api.github.com/repos/hmrc/fset-faststream/branches{/branch}","tags_url":"https://api.github.com/repos/hmrc/fset-faststream/tags","blobs_url":"https://api.github.com/repos/hmrc/fset-faststream/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hmrc/fset-faststream/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hmrc/fset-faststream/git/refs{/sha}","trees_url":"https://api.github.com/repos/hmrc/fset-faststream/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hmrc/fset-faststream/statuses/{sha}","languages_url":"https://api.github.com/repos/hmrc/fset-faststream/languages","stargazers_url":"https://api.github.com/repos/hmrc/fset-faststream/stargazers","contributors_url":"https://api.github.com/repos/hmrc/fset-faststream/contributors","subscribers_url":"https://api.github.com/repos/hmrc/fset-faststream/subscribers","subscription_url":"https://api.github.com/repos/hmrc/fset-faststream/subscription","commits_url":"https://api.github.com/repos/hmrc/fset-faststream/commits{/sha}","git_commits_url":"https://api.github.com/repos/hmrc/fset-faststream/git/commits{/sha}","comments_url":"https://api.github.com/repos/hmrc/fset-faststream/comments{/number}","issue_comment_url":"https://api.github.com/repos/hmrc/fset-faststream/issues/comments{/number}","contents_url":"https://api.github.com/repos/hmrc/fset-faststream/contents/{+path}","compare_url":"https://api.github.com/repos/hmrc/fset-faststream/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hmrc/fset-faststream/merges","archive_url":"https://api.github.com/repos/hmrc/fset-faststream/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hmrc/fset-faststream/downloads","issues_url":"https://api.github.com/repos/hmrc/fset-faststream/issues{/number}","pulls_url":"https://api.github.com/repos/hmrc/fset-faststream/pulls{/number}","milestones_url":"https://api.github.com/repos/hmrc/fset-faststream/milestones{/number}","notifications_url":"https://api.github.com/repos/hmrc/fset-faststream/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hmrc/fset-faststream/labels{/name}","releases_url":"https://api.github.com/repos/hmrc/fset-faststream/releases{/id}","deployments_url":"https://api.github.com/repos/hmrc/fset-faststream/deployments","created_at":"2016-07-08T13:03:46Z","updated_at":"2016-07-13T15:13:30Z","pushed_at":"2016-10-20T11:12:46Z","git_url":"git://github.com/hmrc/fset-faststream.git","ssh_url":"git@github.com:hmrc/fset-faststream.git","clone_url":"https://github.com/hmrc/fset-faststream.git","svn_url":"https://github.com/hmrc/fset-faststream","homepage":"","size":2134,"stargazers_count":2,"watchers_count":2,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":9,"forks":0,"open_issues":9,"watchers":2,"default_branch":"master"}},"base":{"label":"hmrc:master","ref":"master","sha":"6938dc28b51ee66f0d7a325e17ccdc3cc88ea693","user":{"login":"hmrc","id":5755339,"avatar_url":"https://avatars.githubusercontent.com/u/5755339?v=3","gravatar_id":"","url":"https://api.github.com/users/hmrc","html_url":"https://github.com/hmrc","followers_url":"https://api.github.com/users/hmrc/followers","following_url":"https://api.github.com/users/hmrc/following{/other_user}","gists_url":"https://api.github.com/users/hmrc/gists{/gist_id}","starred_url":"https://api.github.com/users/hmrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmrc/subscriptions","organizations_url":"https://api.github.com/users/hmrc/orgs","repos_url":"https://api.github.com/users/hmrc/repos","events_url":"https://api.github.com/users/hmrc/events{/privacy}","received_events_url":"https://api.github.com/users/hmrc/received_events","type":"Organization","site_admin":false},"repo":{"id":62889113,"name":"fset-faststream","full_name":"hmrc/fset-faststream","owner":{"login":"hmrc","id":5755339,"avatar_url":"https://avatars.githubusercontent.com/u/5755339?v=3","gravatar_id":"","url":"https://api.github.com/users/hmrc","html_url":"https://github.com/hmrc","followers_url":"https://api.github.com/users/hmrc/followers","following_url":"https://api.github.com/users/hmrc/following{/other_user}","gists_url":"https://api.github.com/users/hmrc/gists{/gist_id}","starred_url":"https://api.github.com/users/hmrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmrc/subscriptions","organizations_url":"https://api.github.com/users/hmrc/orgs","repos_url":"https://api.github.com/users/hmrc/repos","events_url":"https://api.github.com/users/hmrc/events{/privacy}","received_events_url":"https://api.github.com/users/hmrc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hmrc/fset-faststream","description":null,"fork":false,"url":"https://api.github.com/repos/hmrc/fset-faststream","forks_url":"https://api.github.com/repos/hmrc/fset-faststream/forks","keys_url":"https://api.github.com/repos/hmrc/fset-faststream/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hmrc/fset-faststream/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hmrc/fset-faststream/teams","hooks_url":"https://api.github.com/repos/hmrc/fset-faststream/hooks","issue_events_url":"https://api.github.com/repos/hmrc/fset-faststream/issues/events{/number}","events_url":"https://api.github.com/repos/hmrc/fset-faststream/events","assignees_url":"https://api.github.com/repos/hmrc/fset-faststream/assignees{/user}","branches_url":"https://api.github.com/repos/hmrc/fset-faststream/branches{/branch}","tags_url":"https://api.github.com/repos/hmrc/fset-faststream/tags","blobs_url":"https://api.github.com/repos/hmrc/fset-faststream/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hmrc/fset-faststream/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hmrc/fset-faststream/git/refs{/sha}","trees_url":"https://api.github.com/repos/hmrc/fset-faststream/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hmrc/fset-faststream/statuses/{sha}","languages_url":"https://api.github.com/repos/hmrc/fset-faststream/languages","stargazers_url":"https://api.github.com/repos/hmrc/fset-faststream/stargazers","contributors_url":"https://api.github.com/repos/hmrc/fset-faststream/contributors","subscribers_url":"https://api.github.com/repos/hmrc/fset-faststream/subscribers","subscription_url":"https://api.github.com/repos/hmrc/fset-faststream/subscription","commits_url":"https://api.github.com/repos/hmrc/fset-faststream/commits{/sha}","git_commits_url":"https://api.github.com/repos/hmrc/fset-faststream/git/commits{/sha}","comments_url":"https://api.github.com/repos/hmrc/fset-faststream/comments{/number}","issue_comment_url":"https://api.github.com/repos/hmrc/fset-faststream/issues/comments{/number}","contents_url":"https://api.github.com/repos/hmrc/fset-faststream/contents/{+path}","compare_url":"https://api.github.com/repos/hmrc/fset-faststream/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hmrc/fset-faststream/merges","archive_url":"https://api.github.com/repos/hmrc/fset-faststream/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hmrc/fset-faststream/downloads","issues_url":"https://api.github.com/repos/hmrc/fset-faststream/issues{/number}","pulls_url":"https://api.github.com/repos/hmrc/fset-faststream/pulls{/number}","milestones_url":"https://api.github.com/repos/hmrc/fset-faststream/milestones{/number}","notifications_url":"https://api.github.com/repos/hmrc/fset-faststream/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hmrc/fset-faststream/labels{/name}","releases_url":"https://api.github.com/repos/hmrc/fset-faststream/releases{/id}","deployments_url":"https://api.github.com/repos/hmrc/fset-faststream/deployments","created_at":"2016-07-08T13:03:46Z","updated_at":"2016-07-13T15:13:30Z","pushed_at":"2016-10-20T11:12:46Z","git_url":"git://github.com/hmrc/fset-faststream.git","ssh_url":"git@github.com:hmrc/fset-faststream.git","clone_url":"https://github.com/hmrc/fset-faststream.git","svn_url":"https://github.com/hmrc/fset-faststream","homepage":"","size":2134,"stargazers_count":2,"watchers_count":2,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":9,"forks":0,"open_issues":9,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hmrc/fset-faststream/pulls/137"},"html":{"href":"https://github.com/hmrc/fset-faststream/pull/137"},"issue":{"href":"https://api.github.com/repos/hmrc/fset-faststream/issues/137"},"comments":{"href":"https://api.github.com/repos/hmrc/fset-faststream/issues/137/comments"},"review_comments":{"href":"https://api.github.com/repos/hmrc/fset-faststream/pulls/137/comments"},"review_comment":{"href":"https://api.github.com/repos/hmrc/fset-faststream/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hmrc/fset-faststream/pulls/137/commits"},"statuses":{"href":"https://api.github.com/repos/hmrc/fset-faststream/statuses/7a1cbf6057796f5f2c8793a00622a30f4f39f611"}}}}
{"actor":{"display_login":"ollyw"}}