{"action":"created","comment":{"url":"https://api.github.com/repos/swalker2m/ocs/pulls/comments/49861191","id":49861191,"diff_hunk":"@@ -177,90 +175,92 @@ class GuideGroupSpec extends Specification with ScalaCheck with Arbitraries {\n       }\n \n     \"return matching guide probe targets for all guide probes with associated targets\" in\n-      forAll { (g: GuideGroup) =>\n+      forAll { g: GuideGroup =>\n         val gpts1 = g.getAll.asScalaList\n         val gpts2 = AllProbes.flatMap { gp => g.get(gp).asScalaOpt }\n         gpts1 == gpts2\n       }\n   }\n-/*\n-  \"GuideGroup getAll\" should {\n-    \"\" in\n-      forAll { (g: GuideGroup) =>\n-        true\n-      }\n-\n-    \"\" in\n-      forAll { (g: GuideGroup) =>\n-        true\n-      }\n-\n-    \"\" in\n-      forAll { (g: GuideGroup) =>\n-        true\n-      }\n-\n-    \"\" in\n-      forAll { (g: GuideGroup) =>\n-        true\n-      }\n-\n-    \"\" in\n-      forAll { (g: GuideGroup) =>\n-        true\n-      }\n \n-    \"\" in\n-      forAll { (g: GuideGroup) =>\n-        true\n+  \"GuideGroup putAll\" should {\n+    \"contain the original primary guide probes and all primary guide probes for which targets have been added\" in\n+      forAll { (g: GuideGroup, gps: Set[GuideProbe]) =>\n+        val gpts = gps.map(GuideProbeTargets.create(_, new SPTarget())).toList.asImList\n+        val allGps = g.getPrimaryReferencedGuiders.asScala.toSet ++ gps\n+        g.putAll(gpts).getPrimaryReferencedGuiders.asScala.toSet == allGps\n       }\n \n-    \"\" in\n-      forAll { (g: GuideGroup) =>\n-        true\n-      }\n   }\n \n-  \"GuideGroup getAll\" should {\n-    \"\" in\n-      forAll { (g: GuideGroup) =>\n-        true\n+  \"GuideGroup setAll\" should {\n+    \"only contain the guide probes in the collection\" in\n+      forAll { (g: GuideGroup, gps: Set[GuideProbe]) =>\n+        val gpts = gps.map(GuideProbeTargets.create(_, new SPTarget())).toList.asImList\n+        val g2 = g.setAll(gpts)\n+        val gpOut = g.getReferencedGuiders.asScala.toSet -- g2.getReferencedGuiders.asScala.toSet\n+        g2.getReferencedGuiders.asScala.toSet == gpts.asScalaList.map(_.getGuider).toSet &&\n+          gpOut.forall(gp => !g2.contains(gp))","path":"bundle/edu.gemini.pot/src/test/scala/edu/gemini/spModel/target/env/GuideGroupSpec.scala","position":236,"original_position":241,"commit_id":"f1db5cebe8ecaa451a2a5f4049716941fc6d5440","original_commit_id":"a64af73ab636f9a0531cecad810177664c499bc1","user":{"login":"swalker2m","id":4906023,"avatar_url":"https://avatars.githubusercontent.com/u/4906023?v=3","gravatar_id":"","url":"https://api.github.com/users/swalker2m","html_url":"https://github.com/swalker2m","followers_url":"https://api.github.com/users/swalker2m/followers","following_url":"https://api.github.com/users/swalker2m/following{/other_user}","gists_url":"https://api.github.com/users/swalker2m/gists{/gist_id}","starred_url":"https://api.github.com/users/swalker2m/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swalker2m/subscriptions","organizations_url":"https://api.github.com/users/swalker2m/orgs","repos_url":"https://api.github.com/users/swalker2m/repos","events_url":"https://api.github.com/users/swalker2m/events{/privacy}","received_events_url":"https://api.github.com/users/swalker2m/received_events","type":"User","site_admin":false},"body":"Here too we should add a test that verifies that it is the same as calling `GuideGroup.clear` and then calling `GuideGroup.putAll`.  \r\n\r\nAlso, I guess we could add an `Arbitraries` entry for `ImList` and one for `GuideProbeTargets` so they don't need to be explicitly created.","created_at":"2016-01-15T14:55:40Z","updated_at":"2016-01-15T14:55:40Z","html_url":"https://github.com/swalker2m/ocs/pull/2#discussion_r49861191","pull_request_url":"https://api.github.com/repos/swalker2m/ocs/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/swalker2m/ocs/pulls/comments/49861191"},"html":{"href":"https://github.com/swalker2m/ocs/pull/2#discussion_r49861191"},"pull_request":{"href":"https://api.github.com/repos/swalker2m/ocs/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/swalker2m/ocs/pulls/2","id":56170297,"html_url":"https://github.com/swalker2m/ocs/pull/2","diff_url":"https://github.com/swalker2m/ocs/pull/2.diff","patch_url":"https://github.com/swalker2m/ocs/pull/2.patch","issue_url":"https://api.github.com/repos/swalker2m/ocs/issues/2","number":2,"state":"open","locked":false,"title":"OCSADV-514: Bug fix and test cases.","user":{"login":"sraaphorst","id":8795653,"avatar_url":"https://avatars.githubusercontent.com/u/8795653?v=3","gravatar_id":"","url":"https://api.github.com/users/sraaphorst","html_url":"https://github.com/sraaphorst","followers_url":"https://api.github.com/users/sraaphorst/followers","following_url":"https://api.github.com/users/sraaphorst/following{/other_user}","gists_url":"https://api.github.com/users/sraaphorst/gists{/gist_id}","starred_url":"https://api.github.com/users/sraaphorst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sraaphorst/subscriptions","organizations_url":"https://api.github.com/users/sraaphorst/orgs","repos_url":"https://api.github.com/users/sraaphorst/repos","events_url":"https://api.github.com/users/sraaphorst/events{/privacy}","received_events_url":"https://api.github.com/users/sraaphorst/received_events","type":"User","site_admin":false},"body":"This corrects a bug in `GuideGroup.put` where the left side of `Zipper`s was being reversed, and adds test cases for `GuideGroup` and `OptsList`.","created_at":"2016-01-15T13:44:05Z","updated_at":"2016-01-15T14:55:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e54d387b109685fa8607deb5075e3a693e09a2fd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/swalker2m/ocs/pulls/2/commits","review_comments_url":"https://api.github.com/repos/swalker2m/ocs/pulls/2/comments","review_comment_url":"https://api.github.com/repos/swalker2m/ocs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/swalker2m/ocs/issues/2/comments","statuses_url":"https://api.github.com/repos/swalker2m/ocs/statuses/f1db5cebe8ecaa451a2a5f4049716941fc6d5440","head":{"label":"sraaphorst:feature/OCSADV-514","ref":"feature/OCSADV-514","sha":"f1db5cebe8ecaa451a2a5f4049716941fc6d5440","user":{"login":"sraaphorst","id":8795653,"avatar_url":"https://avatars.githubusercontent.com/u/8795653?v=3","gravatar_id":"","url":"https://api.github.com/users/sraaphorst","html_url":"https://github.com/sraaphorst","followers_url":"https://api.github.com/users/sraaphorst/followers","following_url":"https://api.github.com/users/sraaphorst/following{/other_user}","gists_url":"https://api.github.com/users/sraaphorst/gists{/gist_id}","starred_url":"https://api.github.com/users/sraaphorst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sraaphorst/subscriptions","organizations_url":"https://api.github.com/users/sraaphorst/orgs","repos_url":"https://api.github.com/users/sraaphorst/repos","events_url":"https://api.github.com/users/sraaphorst/events{/privacy}","received_events_url":"https://api.github.com/users/sraaphorst/received_events","type":"User","site_admin":false},"repo":{"id":24112855,"name":"ocs","full_name":"sraaphorst/ocs","owner":{"login":"sraaphorst","id":8795653,"avatar_url":"https://avatars.githubusercontent.com/u/8795653?v=3","gravatar_id":"","url":"https://api.github.com/users/sraaphorst","html_url":"https://github.com/sraaphorst","followers_url":"https://api.github.com/users/sraaphorst/followers","following_url":"https://api.github.com/users/sraaphorst/following{/other_user}","gists_url":"https://api.github.com/users/sraaphorst/gists{/gist_id}","starred_url":"https://api.github.com/users/sraaphorst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sraaphorst/subscriptions","organizations_url":"https://api.github.com/users/sraaphorst/orgs","repos_url":"https://api.github.com/users/sraaphorst/repos","events_url":"https://api.github.com/users/sraaphorst/events{/privacy}","received_events_url":"https://api.github.com/users/sraaphorst/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sraaphorst/ocs","description":"","fork":true,"url":"https://api.github.com/repos/sraaphorst/ocs","forks_url":"https://api.github.com/repos/sraaphorst/ocs/forks","keys_url":"https://api.github.com/repos/sraaphorst/ocs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sraaphorst/ocs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sraaphorst/ocs/teams","hooks_url":"https://api.github.com/repos/sraaphorst/ocs/hooks","issue_events_url":"https://api.github.com/repos/sraaphorst/ocs/issues/events{/number}","events_url":"https://api.github.com/repos/sraaphorst/ocs/events","assignees_url":"https://api.github.com/repos/sraaphorst/ocs/assignees{/user}","branches_url":"https://api.github.com/repos/sraaphorst/ocs/branches{/branch}","tags_url":"https://api.github.com/repos/sraaphorst/ocs/tags","blobs_url":"https://api.github.com/repos/sraaphorst/ocs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sraaphorst/ocs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sraaphorst/ocs/git/refs{/sha}","trees_url":"https://api.github.com/repos/sraaphorst/ocs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sraaphorst/ocs/statuses/{sha}","languages_url":"https://api.github.com/repos/sraaphorst/ocs/languages","stargazers_url":"https://api.github.com/repos/sraaphorst/ocs/stargazers","contributors_url":"https://api.github.com/repos/sraaphorst/ocs/contributors","subscribers_url":"https://api.github.com/repos/sraaphorst/ocs/subscribers","subscription_url":"https://api.github.com/repos/sraaphorst/ocs/subscription","commits_url":"https://api.github.com/repos/sraaphorst/ocs/commits{/sha}","git_commits_url":"https://api.github.com/repos/sraaphorst/ocs/git/commits{/sha}","comments_url":"https://api.github.com/repos/sraaphorst/ocs/comments{/number}","issue_comment_url":"https://api.github.com/repos/sraaphorst/ocs/issues/comments{/number}","contents_url":"https://api.github.com/repos/sraaphorst/ocs/contents/{+path}","compare_url":"https://api.github.com/repos/sraaphorst/ocs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sraaphorst/ocs/merges","archive_url":"https://api.github.com/repos/sraaphorst/ocs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sraaphorst/ocs/downloads","issues_url":"https://api.github.com/repos/sraaphorst/ocs/issues{/number}","pulls_url":"https://api.github.com/repos/sraaphorst/ocs/pulls{/number}","milestones_url":"https://api.github.com/repos/sraaphorst/ocs/milestones{/number}","notifications_url":"https://api.github.com/repos/sraaphorst/ocs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sraaphorst/ocs/labels{/name}","releases_url":"https://api.github.com/repos/sraaphorst/ocs/releases{/id}","created_at":"2014-09-16T18:48:19Z","updated_at":"2016-01-11T14:32:59Z","pushed_at":"2016-01-15T14:34:42Z","git_url":"git://github.com/sraaphorst/ocs.git","ssh_url":"git@github.com:sraaphorst/ocs.git","clone_url":"https://github.com/sraaphorst/ocs.git","svn_url":"https://github.com/sraaphorst/ocs","homepage":null,"size":281092,"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":"develop"}},"base":{"label":"swalker2m:feature/OCSADV-514","ref":"feature/OCSADV-514","sha":"fdbae14c022d7cf6519879c6b5803ff7d338b425","user":{"login":"swalker2m","id":4906023,"avatar_url":"https://avatars.githubusercontent.com/u/4906023?v=3","gravatar_id":"","url":"https://api.github.com/users/swalker2m","html_url":"https://github.com/swalker2m","followers_url":"https://api.github.com/users/swalker2m/followers","following_url":"https://api.github.com/users/swalker2m/following{/other_user}","gists_url":"https://api.github.com/users/swalker2m/gists{/gist_id}","starred_url":"https://api.github.com/users/swalker2m/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swalker2m/subscriptions","organizations_url":"https://api.github.com/users/swalker2m/orgs","repos_url":"https://api.github.com/users/swalker2m/repos","events_url":"https://api.github.com/users/swalker2m/events{/privacy}","received_events_url":"https://api.github.com/users/swalker2m/received_events","type":"User","site_admin":false},"repo":{"id":23966397,"name":"ocs","full_name":"swalker2m/ocs","owner":{"login":"swalker2m","id":4906023,"avatar_url":"https://avatars.githubusercontent.com/u/4906023?v=3","gravatar_id":"","url":"https://api.github.com/users/swalker2m","html_url":"https://github.com/swalker2m","followers_url":"https://api.github.com/users/swalker2m/followers","following_url":"https://api.github.com/users/swalker2m/following{/other_user}","gists_url":"https://api.github.com/users/swalker2m/gists{/gist_id}","starred_url":"https://api.github.com/users/swalker2m/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swalker2m/subscriptions","organizations_url":"https://api.github.com/users/swalker2m/orgs","repos_url":"https://api.github.com/users/swalker2m/repos","events_url":"https://api.github.com/users/swalker2m/events{/privacy}","received_events_url":"https://api.github.com/users/swalker2m/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/swalker2m/ocs","description":"","fork":true,"url":"https://api.github.com/repos/swalker2m/ocs","forks_url":"https://api.github.com/repos/swalker2m/ocs/forks","keys_url":"https://api.github.com/repos/swalker2m/ocs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/swalker2m/ocs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/swalker2m/ocs/teams","hooks_url":"https://api.github.com/repos/swalker2m/ocs/hooks","issue_events_url":"https://api.github.com/repos/swalker2m/ocs/issues/events{/number}","events_url":"https://api.github.com/repos/swalker2m/ocs/events","assignees_url":"https://api.github.com/repos/swalker2m/ocs/assignees{/user}","branches_url":"https://api.github.com/repos/swalker2m/ocs/branches{/branch}","tags_url":"https://api.github.com/repos/swalker2m/ocs/tags","blobs_url":"https://api.github.com/repos/swalker2m/ocs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/swalker2m/ocs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/swalker2m/ocs/git/refs{/sha}","trees_url":"https://api.github.com/repos/swalker2m/ocs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/swalker2m/ocs/statuses/{sha}","languages_url":"https://api.github.com/repos/swalker2m/ocs/languages","stargazers_url":"https://api.github.com/repos/swalker2m/ocs/stargazers","contributors_url":"https://api.github.com/repos/swalker2m/ocs/contributors","subscribers_url":"https://api.github.com/repos/swalker2m/ocs/subscribers","subscription_url":"https://api.github.com/repos/swalker2m/ocs/subscription","commits_url":"https://api.github.com/repos/swalker2m/ocs/commits{/sha}","git_commits_url":"https://api.github.com/repos/swalker2m/ocs/git/commits{/sha}","comments_url":"https://api.github.com/repos/swalker2m/ocs/comments{/number}","issue_comment_url":"https://api.github.com/repos/swalker2m/ocs/issues/comments{/number}","contents_url":"https://api.github.com/repos/swalker2m/ocs/contents/{+path}","compare_url":"https://api.github.com/repos/swalker2m/ocs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/swalker2m/ocs/merges","archive_url":"https://api.github.com/repos/swalker2m/ocs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/swalker2m/ocs/downloads","issues_url":"https://api.github.com/repos/swalker2m/ocs/issues{/number}","pulls_url":"https://api.github.com/repos/swalker2m/ocs/pulls{/number}","milestones_url":"https://api.github.com/repos/swalker2m/ocs/milestones{/number}","notifications_url":"https://api.github.com/repos/swalker2m/ocs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/swalker2m/ocs/labels{/name}","releases_url":"https://api.github.com/repos/swalker2m/ocs/releases{/id}","created_at":"2014-09-12T15:41:27Z","updated_at":"2015-05-08T19:44:24Z","pushed_at":"2016-01-15T14:34:42Z","git_url":"git://github.com/swalker2m/ocs.git","ssh_url":"git@github.com:swalker2m/ocs.git","clone_url":"https://github.com/swalker2m/ocs.git","svn_url":"https://github.com/swalker2m/ocs","homepage":null,"size":281039,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/swalker2m/ocs/pulls/2"},"html":{"href":"https://github.com/swalker2m/ocs/pull/2"},"issue":{"href":"https://api.github.com/repos/swalker2m/ocs/issues/2"},"comments":{"href":"https://api.github.com/repos/swalker2m/ocs/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/swalker2m/ocs/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/swalker2m/ocs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/swalker2m/ocs/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/swalker2m/ocs/statuses/f1db5cebe8ecaa451a2a5f4049716941fc6d5440"}}}}