{"action":"created","comment":{"url":"https://api.github.com/repos/openmrs/openmrs-core/pulls/comments/60675269","id":60675269,"diff_hunk":"@@ -723,6 +723,113 @@ public void getBirthDateTime_shouldReturnNullIfBirthtimeIsNull() throws Exceptio\n \t\tAssert.assertNull(person.getBirthDateTime());\n \t}\n \n+\t/**\n+\t * @see Person#getAttribute(String)\n+\t * @verifies get attribute based on String attributename\n+\t */\n+\t@Test\n+\tpublic void  getAttribute_shouldGetPersonAttributeBasedOnAttributeName() throws Exception {\n+\t\tPerson person = personHelper(false, 1, 2, 3, \"name1\", \"name2\", \"name3\", \"value1\", \"value2\", \"value3\");\n+\t    Assert.assertEquals(\"name3\", person.getAttribute(\"name3\").getAttributeType().getName());\n+\t}\n+\n+\t/**\n+\t * @see Person#getAttribute(String)\n+\t * @verifies null if all voided, get attribute based on String attributename\n+\t */\n+\t@Test\n+\tpublic void  getAttribute_shouldGetPersonAttributeBasedOnAttributeNameNullIfVoided() throws Exception {\n+\t\tPerson person = personHelper(true, 1, 2, 3, \"name1\", \"name2\", \"name3\", \"value1\", \"value2\", \"value3\");\n+\t    Assert.assertEquals(null, person.getAttribute(\"name3\"));\n+\t}\n+\n+\t/**\n+\t * @see Person#getAttribute(PersonAttributeType)\n+\t * @verifies null if all voided\n+\t */\n+\t@Test\n+\tpublic void  getAttribute_shouldGetPersonAttributeBasedOnPersonAttributeTypeNullIfVoided() throws Exception {\n+\t\tPerson person = personHelper(true, 1, 2, 3, \"name1\", \"name2\", \"name3\", \"value1\", \"value2\", \"value3\");\n+\t \tPersonAttributeType type = new PersonAttributeType(new Integer(3));\n+\t \ttype.setName(\"name3\");\n+\t    Assert.assertEquals(null, person.getAttribute(type));\n+\t}\n+\n+\t/**\n+\t * @see Person#getAttribute(Integer)\n+\t * @verifies get attribute based on Integer attributetypeid\n+\t */\n+\t@Test\n+\tpublic void  getAttribute_shouldGetPersonAttributeBasedOnAttributeTypeId() throws Exception {\n+\t\tPerson person = personHelper(false, 1, 2, 3, \"name1\", \"name2\", \"name3\", \"value1\", \"value2\", \"value3\");\n+\t    Assert.assertEquals(new Integer(3), person.getAttribute(new Integer(3)).getAttributeType().getId());\n+\t}\n+\n+\t/**\n+\t * @see Person#getAttribute(Integer)\n+\t * @verifies null if all voided, get attribute based on String attributetypeid\n+\t */\n+\t@Test\n+\tpublic void  getAttribute_shouldGetPersonAttributeBasedOnAttributeTypeIdNullIfVoided() throws Exception {\n+\t\tPerson person = personHelper(true, 1, 2, 3, \"name1\", \"name2\", \"name3\", \"value1\", \"value2\", \"value3\");\n+\t    Assert.assertEquals(null, person.getAttribute(new Integer(3)));\n+\t}\n+\n+\t/**\n+\t * @see Person#getAttributes(String)\n+\t * @verifies get attributes based on String attributename\n+\t */\n+\t@Test\n+\tpublic void  getAttributes_shouldGetPersonAttributesBasedOnAttributeName() throws Exception {\n+\t\tPerson person = personHelper(false, 1, 2, 3, \"name1\", \"name1\", \"name3\", \"value1\", \"value2\", \"value3\");\n+\t    Assert.assertEquals(2, person.getAttributes(\"name1\").size());\n+\t}\n+\n+\t/**\n+\t * @see Person#getAttributes(Integer)\n+\t * @verifies get attributes based on Integer attributetypeid\n+\t */\n+\t@Test\n+\tpublic void  getAttributes_shouldGetPersonAttributesBasedOnAttributeTypeId() throws Exception {\n+\t\tPerson person = personHelper(false, 1, 1, 3, \"name1\", \"name2\", \"name3\", \"value1\", \"value2\", \"value3\");\n+\t    Assert.assertEquals(2, person.getAttributes(new Integer(1)).size());\n+\t}\n+\n+/**\n+\t * @see Person#getAttributes(Integer)\n+\t * @verifies get attributes based on Integer attributetypeid, null if voided\n+\t */\n+\t@Test\n+\tpublic void  getAttributes_shouldGetPersonAttributesBasedOnAttributeTypeIdNullIfVoided() throws Exception {\n+\t\tPerson person = personHelper(true, 1, 1, 3, \"name1\", \"name2\", \"name3\", \"value1\", \"value2\", \"value3\");\n+\t    Assert.assertEquals(0, person.getAttributes(new Integer(1)).size());\n+\t}\n+\n+private Person personHelper(boolean isVoid, int attributeType1, int attributeType2, int attributeType3, String attributeName1, String attributeName2, String attributeName3, String attributeValue1, String attributeValue2, String attributeValue3) {","path":"api/src/test/java/org/openmrs/PersonTest.java","position":null,"original_position":86,"commit_id":"57e8dfcbae64c8387e54d668ae9f76cb4000b456","original_commit_id":"684ccf0e33dc366c02ba34c7cb4ea7e5472ee3dd","user":{"login":"astorga2","id":8422829,"avatar_url":"https://avatars.githubusercontent.com/u/8422829?v=3","gravatar_id":"","url":"https://api.github.com/users/astorga2","html_url":"https://github.com/astorga2","followers_url":"https://api.github.com/users/astorga2/followers","following_url":"https://api.github.com/users/astorga2/following{/other_user}","gists_url":"https://api.github.com/users/astorga2/gists{/gist_id}","starred_url":"https://api.github.com/users/astorga2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astorga2/subscriptions","organizations_url":"https://api.github.com/users/astorga2/orgs","repos_url":"https://api.github.com/users/astorga2/repos","events_url":"https://api.github.com/users/astorga2/events{/privacy}","received_events_url":"https://api.github.com/users/astorga2/received_events","type":"User","site_admin":false},"body":"Fix this and should annotations.","created_at":"2016-04-22T00:17:56Z","updated_at":"2016-04-22T00:17:56Z","html_url":"https://github.com/openmrs/openmrs-core/pull/1770#discussion_r60675269","pull_request_url":"https://api.github.com/repos/openmrs/openmrs-core/pulls/1770","_links":{"self":{"href":"https://api.github.com/repos/openmrs/openmrs-core/pulls/comments/60675269"},"html":{"href":"https://github.com/openmrs/openmrs-core/pull/1770#discussion_r60675269"},"pull_request":{"href":"https://api.github.com/repos/openmrs/openmrs-core/pulls/1770"}}},"pull_request":{"url":"https://api.github.com/repos/openmrs/openmrs-core/pulls/1770","id":66717253,"html_url":"https://github.com/openmrs/openmrs-core/pull/1770","diff_url":"https://github.com/openmrs/openmrs-core/pull/1770.diff","patch_url":"https://github.com/openmrs/openmrs-core/pull/1770.patch","issue_url":"https://api.github.com/repos/openmrs/openmrs-core/issues/1770","number":1770,"state":"open","locked":false,"title":"TRUNK-4855 adding more unit test to PersonTest","user":{"login":"ssabada","id":10926929,"avatar_url":"https://avatars.githubusercontent.com/u/10926929?v=3","gravatar_id":"","url":"https://api.github.com/users/ssabada","html_url":"https://github.com/ssabada","followers_url":"https://api.github.com/users/ssabada/followers","following_url":"https://api.github.com/users/ssabada/following{/other_user}","gists_url":"https://api.github.com/users/ssabada/gists{/gist_id}","starred_url":"https://api.github.com/users/ssabada/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssabada/subscriptions","organizations_url":"https://api.github.com/users/ssabada/orgs","repos_url":"https://api.github.com/users/ssabada/repos","events_url":"https://api.github.com/users/ssabada/events{/privacy}","received_events_url":"https://api.github.com/users/ssabada/received_events","type":"User","site_admin":false},"body":"Adding more unit test in PersonTest to cover previously uncovered method in Person.java","created_at":"2016-04-15T23:15:32Z","updated_at":"2016-04-22T00:17:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"21d0f5d5c7f57c4b16bc0187f145efd8ca93f54d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openmrs/openmrs-core/pulls/1770/commits","review_comments_url":"https://api.github.com/repos/openmrs/openmrs-core/pulls/1770/comments","review_comment_url":"https://api.github.com/repos/openmrs/openmrs-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openmrs/openmrs-core/issues/1770/comments","statuses_url":"https://api.github.com/repos/openmrs/openmrs-core/statuses/57e8dfcbae64c8387e54d668ae9f76cb4000b456","head":{"label":"astorga2:TRUNK-4855","ref":"TRUNK-4855","sha":"57e8dfcbae64c8387e54d668ae9f76cb4000b456","user":{"login":"astorga2","id":8422829,"avatar_url":"https://avatars.githubusercontent.com/u/8422829?v=3","gravatar_id":"","url":"https://api.github.com/users/astorga2","html_url":"https://github.com/astorga2","followers_url":"https://api.github.com/users/astorga2/followers","following_url":"https://api.github.com/users/astorga2/following{/other_user}","gists_url":"https://api.github.com/users/astorga2/gists{/gist_id}","starred_url":"https://api.github.com/users/astorga2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astorga2/subscriptions","organizations_url":"https://api.github.com/users/astorga2/orgs","repos_url":"https://api.github.com/users/astorga2/repos","events_url":"https://api.github.com/users/astorga2/events{/privacy}","received_events_url":"https://api.github.com/users/astorga2/received_events","type":"User","site_admin":false},"repo":{"id":56212755,"name":"openmrs-core","full_name":"astorga2/openmrs-core","owner":{"login":"astorga2","id":8422829,"avatar_url":"https://avatars.githubusercontent.com/u/8422829?v=3","gravatar_id":"","url":"https://api.github.com/users/astorga2","html_url":"https://github.com/astorga2","followers_url":"https://api.github.com/users/astorga2/followers","following_url":"https://api.github.com/users/astorga2/following{/other_user}","gists_url":"https://api.github.com/users/astorga2/gists{/gist_id}","starred_url":"https://api.github.com/users/astorga2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astorga2/subscriptions","organizations_url":"https://api.github.com/users/astorga2/orgs","repos_url":"https://api.github.com/users/astorga2/repos","events_url":"https://api.github.com/users/astorga2/events{/privacy}","received_events_url":"https://api.github.com/users/astorga2/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/astorga2/openmrs-core","description":"OpenMRS API and web application code","fork":true,"url":"https://api.github.com/repos/astorga2/openmrs-core","forks_url":"https://api.github.com/repos/astorga2/openmrs-core/forks","keys_url":"https://api.github.com/repos/astorga2/openmrs-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/astorga2/openmrs-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/astorga2/openmrs-core/teams","hooks_url":"https://api.github.com/repos/astorga2/openmrs-core/hooks","issue_events_url":"https://api.github.com/repos/astorga2/openmrs-core/issues/events{/number}","events_url":"https://api.github.com/repos/astorga2/openmrs-core/events","assignees_url":"https://api.github.com/repos/astorga2/openmrs-core/assignees{/user}","branches_url":"https://api.github.com/repos/astorga2/openmrs-core/branches{/branch}","tags_url":"https://api.github.com/repos/astorga2/openmrs-core/tags","blobs_url":"https://api.github.com/repos/astorga2/openmrs-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/astorga2/openmrs-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/astorga2/openmrs-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/astorga2/openmrs-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/astorga2/openmrs-core/statuses/{sha}","languages_url":"https://api.github.com/repos/astorga2/openmrs-core/languages","stargazers_url":"https://api.github.com/repos/astorga2/openmrs-core/stargazers","contributors_url":"https://api.github.com/repos/astorga2/openmrs-core/contributors","subscribers_url":"https://api.github.com/repos/astorga2/openmrs-core/subscribers","subscription_url":"https://api.github.com/repos/astorga2/openmrs-core/subscription","commits_url":"https://api.github.com/repos/astorga2/openmrs-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/astorga2/openmrs-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/astorga2/openmrs-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/astorga2/openmrs-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/astorga2/openmrs-core/contents/{+path}","compare_url":"https://api.github.com/repos/astorga2/openmrs-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/astorga2/openmrs-core/merges","archive_url":"https://api.github.com/repos/astorga2/openmrs-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/astorga2/openmrs-core/downloads","issues_url":"https://api.github.com/repos/astorga2/openmrs-core/issues{/number}","pulls_url":"https://api.github.com/repos/astorga2/openmrs-core/pulls{/number}","milestones_url":"https://api.github.com/repos/astorga2/openmrs-core/milestones{/number}","notifications_url":"https://api.github.com/repos/astorga2/openmrs-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/astorga2/openmrs-core/labels{/name}","releases_url":"https://api.github.com/repos/astorga2/openmrs-core/releases{/id}","deployments_url":"https://api.github.com/repos/astorga2/openmrs-core/deployments","created_at":"2016-04-14T06:27:38Z","updated_at":"2016-04-14T06:27:51Z","pushed_at":"2016-04-22T00:17:37Z","git_url":"git://github.com/astorga2/openmrs-core.git","ssh_url":"git@github.com:astorga2/openmrs-core.git","clone_url":"https://github.com/astorga2/openmrs-core.git","svn_url":"https://github.com/astorga2/openmrs-core","homepage":"http://openmrs.org","size":219099,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"openmrs:master","ref":"master","sha":"60ab1b09e8d7b90a59ee711fd696612afcc6e60d","user":{"login":"openmrs","id":860776,"avatar_url":"https://avatars.githubusercontent.com/u/860776?v=3","gravatar_id":"","url":"https://api.github.com/users/openmrs","html_url":"https://github.com/openmrs","followers_url":"https://api.github.com/users/openmrs/followers","following_url":"https://api.github.com/users/openmrs/following{/other_user}","gists_url":"https://api.github.com/users/openmrs/gists{/gist_id}","starred_url":"https://api.github.com/users/openmrs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openmrs/subscriptions","organizations_url":"https://api.github.com/users/openmrs/orgs","repos_url":"https://api.github.com/users/openmrs/repos","events_url":"https://api.github.com/users/openmrs/events{/privacy}","received_events_url":"https://api.github.com/users/openmrs/received_events","type":"Organization","site_admin":false},"repo":{"id":5187976,"name":"openmrs-core","full_name":"openmrs/openmrs-core","owner":{"login":"openmrs","id":860776,"avatar_url":"https://avatars.githubusercontent.com/u/860776?v=3","gravatar_id":"","url":"https://api.github.com/users/openmrs","html_url":"https://github.com/openmrs","followers_url":"https://api.github.com/users/openmrs/followers","following_url":"https://api.github.com/users/openmrs/following{/other_user}","gists_url":"https://api.github.com/users/openmrs/gists{/gist_id}","starred_url":"https://api.github.com/users/openmrs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openmrs/subscriptions","organizations_url":"https://api.github.com/users/openmrs/orgs","repos_url":"https://api.github.com/users/openmrs/repos","events_url":"https://api.github.com/users/openmrs/events{/privacy}","received_events_url":"https://api.github.com/users/openmrs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openmrs/openmrs-core","description":"OpenMRS API and web application code","fork":false,"url":"https://api.github.com/repos/openmrs/openmrs-core","forks_url":"https://api.github.com/repos/openmrs/openmrs-core/forks","keys_url":"https://api.github.com/repos/openmrs/openmrs-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openmrs/openmrs-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openmrs/openmrs-core/teams","hooks_url":"https://api.github.com/repos/openmrs/openmrs-core/hooks","issue_events_url":"https://api.github.com/repos/openmrs/openmrs-core/issues/events{/number}","events_url":"https://api.github.com/repos/openmrs/openmrs-core/events","assignees_url":"https://api.github.com/repos/openmrs/openmrs-core/assignees{/user}","branches_url":"https://api.github.com/repos/openmrs/openmrs-core/branches{/branch}","tags_url":"https://api.github.com/repos/openmrs/openmrs-core/tags","blobs_url":"https://api.github.com/repos/openmrs/openmrs-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openmrs/openmrs-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openmrs/openmrs-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/openmrs/openmrs-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openmrs/openmrs-core/statuses/{sha}","languages_url":"https://api.github.com/repos/openmrs/openmrs-core/languages","stargazers_url":"https://api.github.com/repos/openmrs/openmrs-core/stargazers","contributors_url":"https://api.github.com/repos/openmrs/openmrs-core/contributors","subscribers_url":"https://api.github.com/repos/openmrs/openmrs-core/subscribers","subscription_url":"https://api.github.com/repos/openmrs/openmrs-core/subscription","commits_url":"https://api.github.com/repos/openmrs/openmrs-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/openmrs/openmrs-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/openmrs/openmrs-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/openmrs/openmrs-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/openmrs/openmrs-core/contents/{+path}","compare_url":"https://api.github.com/repos/openmrs/openmrs-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openmrs/openmrs-core/merges","archive_url":"https://api.github.com/repos/openmrs/openmrs-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openmrs/openmrs-core/downloads","issues_url":"https://api.github.com/repos/openmrs/openmrs-core/issues{/number}","pulls_url":"https://api.github.com/repos/openmrs/openmrs-core/pulls{/number}","milestones_url":"https://api.github.com/repos/openmrs/openmrs-core/milestones{/number}","notifications_url":"https://api.github.com/repos/openmrs/openmrs-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openmrs/openmrs-core/labels{/name}","releases_url":"https://api.github.com/repos/openmrs/openmrs-core/releases{/id}","deployments_url":"https://api.github.com/repos/openmrs/openmrs-core/deployments","created_at":"2012-07-26T04:54:29Z","updated_at":"2016-04-20T01:24:58Z","pushed_at":"2016-04-22T00:17:39Z","git_url":"git://github.com/openmrs/openmrs-core.git","ssh_url":"git@github.com:openmrs/openmrs-core.git","clone_url":"https://github.com/openmrs/openmrs-core.git","svn_url":"https://github.com/openmrs/openmrs-core","homepage":"http://openmrs.org","size":237134,"stargazers_count":324,"watchers_count":324,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1451,"mirror_url":null,"open_issues_count":8,"forks":1451,"open_issues":8,"watchers":324,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openmrs/openmrs-core/pulls/1770"},"html":{"href":"https://github.com/openmrs/openmrs-core/pull/1770"},"issue":{"href":"https://api.github.com/repos/openmrs/openmrs-core/issues/1770"},"comments":{"href":"https://api.github.com/repos/openmrs/openmrs-core/issues/1770/comments"},"review_comments":{"href":"https://api.github.com/repos/openmrs/openmrs-core/pulls/1770/comments"},"review_comment":{"href":"https://api.github.com/repos/openmrs/openmrs-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openmrs/openmrs-core/pulls/1770/commits"},"statuses":{"href":"https://api.github.com/repos/openmrs/openmrs-core/statuses/57e8dfcbae64c8387e54d668ae9f76cb4000b456"}}}}