{"action":"created","comment":{"url":"https://api.github.com/repos/openmrs/openmrs-core/pulls/comments/59688282","id":59688282,"diff_hunk":"@@ -62,8 +62,25 @@ public static String format(Date date) {\n \tpublic static String format(Date date, FORMAT_TYPE type) {\n \t\treturn format(date, Context.getLocale(), type);\n \t}\n-\t\n+\n+\t/**\n+\t * This method formats a date object according to a particular locale and returns the date as a string.\n+\t * The string can contain only the date (month, day and year), only the time (hours, minutes, seconds) or as a\n+\t * timestamp (both date and time).\n+\t *\n+\t * @param date input date to format as a string\n+\t * @param locale input locale to determine how to format the date\n+\t * @param type input type to determine how much information from the date is returned\n+\t * @return empty string if one of the parameters is null. Otherwise a string object for the date such that it is\n+\t * formatted according to locale and the amount of information it contains is determined by type.\n+\t * @should not fail with null date\n+\t * @should not fail with null locale","path":"api/src/main/java/org/openmrs/util/Format.java","position":17,"original_position":17,"commit_id":"4f4575ea3e5f161dfce652afcaebaa83ff01d1fe","original_commit_id":"4f4575ea3e5f161dfce652afcaebaa83ff01d1fe","user":{"login":"dkayiwa","id":1390773,"avatar_url":"https://avatars.githubusercontent.com/u/1390773?v=3","gravatar_id":"","url":"https://api.github.com/users/dkayiwa","html_url":"https://github.com/dkayiwa","followers_url":"https://api.github.com/users/dkayiwa/followers","following_url":"https://api.github.com/users/dkayiwa/following{/other_user}","gists_url":"https://api.github.com/users/dkayiwa/gists{/gist_id}","starred_url":"https://api.github.com/users/dkayiwa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkayiwa/subscriptions","organizations_url":"https://api.github.com/users/dkayiwa/orgs","repos_url":"https://api.github.com/users/dkayiwa/repos","events_url":"https://api.github.com/users/dkayiwa/events{/privacy}","received_events_url":"https://api.github.com/users/dkayiwa/received_events","type":"User","site_admin":false},"body":"Did you add a should annotation for each and every test you added?","created_at":"2016-04-14T09:36:20Z","updated_at":"2016-04-14T09:36:20Z","html_url":"https://github.com/openmrs/openmrs-core/pull/1760#discussion_r59688282","pull_request_url":"https://api.github.com/repos/openmrs/openmrs-core/pulls/1760","_links":{"self":{"href":"https://api.github.com/repos/openmrs/openmrs-core/pulls/comments/59688282"},"html":{"href":"https://github.com/openmrs/openmrs-core/pull/1760#discussion_r59688282"},"pull_request":{"href":"https://api.github.com/repos/openmrs/openmrs-core/pulls/1760"}}},"pull_request":{"url":"https://api.github.com/repos/openmrs/openmrs-core/pulls/1760","id":65927517,"html_url":"https://github.com/openmrs/openmrs-core/pull/1760","diff_url":"https://github.com/openmrs/openmrs-core/pull/1760.diff","patch_url":"https://github.com/openmrs/openmrs-core/pull/1760.patch","issue_url":"https://api.github.com/repos/openmrs/openmrs-core/issues/1760","number":1760,"state":"open","locked":false,"title":"Adding tests for org.openmrs.util.Format in org.openmrs.util.FormatTe…","user":{"login":"winglam","id":4106907,"avatar_url":"https://avatars.githubusercontent.com/u/4106907?v=3","gravatar_id":"","url":"https://api.github.com/users/winglam","html_url":"https://github.com/winglam","followers_url":"https://api.github.com/users/winglam/followers","following_url":"https://api.github.com/users/winglam/following{/other_user}","gists_url":"https://api.github.com/users/winglam/gists{/gist_id}","starred_url":"https://api.github.com/users/winglam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/winglam/subscriptions","organizations_url":"https://api.github.com/users/winglam/orgs","repos_url":"https://api.github.com/users/winglam/repos","events_url":"https://api.github.com/users/winglam/events{/privacy}","received_events_url":"https://api.github.com/users/winglam/received_events","type":"User","site_admin":false},"body":"…st. The added tests calls org.openmrs.util.Format.format with nulls and valid arguments. The following tests fail because it is expecting org.openmrs.util.Format.format to return null. format_shouldAllowAllNullParameters, format_shouldAllowLocaleTypeNullParameters, format_shouldAllowLocaleNullParameters, and format_shouldAllowDateLocaleNullParameters gets a NullPointerException instead and format_shouldReturnDateWithNullType and format_shouldAllowDateNullParameters receives an empty string as the return.\r\n\r\nA bug report related to this pull request can be found on: \r\nhttps://issues.openmrs.org/browse/TRUNK-4849","created_at":"2016-04-10T23:44:34Z","updated_at":"2016-04-14T09:36:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"452a4c4fbd0899f1c15b6846ee9064cece0a99ec","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openmrs/openmrs-core/pulls/1760/commits","review_comments_url":"https://api.github.com/repos/openmrs/openmrs-core/pulls/1760/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/1760/comments","statuses_url":"https://api.github.com/repos/openmrs/openmrs-core/statuses/4f4575ea3e5f161dfce652afcaebaa83ff01d1fe","head":{"label":"winglam:formattest","ref":"formattest","sha":"4f4575ea3e5f161dfce652afcaebaa83ff01d1fe","user":{"login":"winglam","id":4106907,"avatar_url":"https://avatars.githubusercontent.com/u/4106907?v=3","gravatar_id":"","url":"https://api.github.com/users/winglam","html_url":"https://github.com/winglam","followers_url":"https://api.github.com/users/winglam/followers","following_url":"https://api.github.com/users/winglam/following{/other_user}","gists_url":"https://api.github.com/users/winglam/gists{/gist_id}","starred_url":"https://api.github.com/users/winglam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/winglam/subscriptions","organizations_url":"https://api.github.com/users/winglam/orgs","repos_url":"https://api.github.com/users/winglam/repos","events_url":"https://api.github.com/users/winglam/events{/privacy}","received_events_url":"https://api.github.com/users/winglam/received_events","type":"User","site_admin":false},"repo":{"id":52558947,"name":"openmrs-core","full_name":"winglam/openmrs-core","owner":{"login":"winglam","id":4106907,"avatar_url":"https://avatars.githubusercontent.com/u/4106907?v=3","gravatar_id":"","url":"https://api.github.com/users/winglam","html_url":"https://github.com/winglam","followers_url":"https://api.github.com/users/winglam/followers","following_url":"https://api.github.com/users/winglam/following{/other_user}","gists_url":"https://api.github.com/users/winglam/gists{/gist_id}","starred_url":"https://api.github.com/users/winglam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/winglam/subscriptions","organizations_url":"https://api.github.com/users/winglam/orgs","repos_url":"https://api.github.com/users/winglam/repos","events_url":"https://api.github.com/users/winglam/events{/privacy}","received_events_url":"https://api.github.com/users/winglam/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/winglam/openmrs-core","description":"OpenMRS API and web application code","fork":true,"url":"https://api.github.com/repos/winglam/openmrs-core","forks_url":"https://api.github.com/repos/winglam/openmrs-core/forks","keys_url":"https://api.github.com/repos/winglam/openmrs-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/winglam/openmrs-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/winglam/openmrs-core/teams","hooks_url":"https://api.github.com/repos/winglam/openmrs-core/hooks","issue_events_url":"https://api.github.com/repos/winglam/openmrs-core/issues/events{/number}","events_url":"https://api.github.com/repos/winglam/openmrs-core/events","assignees_url":"https://api.github.com/repos/winglam/openmrs-core/assignees{/user}","branches_url":"https://api.github.com/repos/winglam/openmrs-core/branches{/branch}","tags_url":"https://api.github.com/repos/winglam/openmrs-core/tags","blobs_url":"https://api.github.com/repos/winglam/openmrs-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/winglam/openmrs-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/winglam/openmrs-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/winglam/openmrs-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/winglam/openmrs-core/statuses/{sha}","languages_url":"https://api.github.com/repos/winglam/openmrs-core/languages","stargazers_url":"https://api.github.com/repos/winglam/openmrs-core/stargazers","contributors_url":"https://api.github.com/repos/winglam/openmrs-core/contributors","subscribers_url":"https://api.github.com/repos/winglam/openmrs-core/subscribers","subscription_url":"https://api.github.com/repos/winglam/openmrs-core/subscription","commits_url":"https://api.github.com/repos/winglam/openmrs-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/winglam/openmrs-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/winglam/openmrs-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/winglam/openmrs-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/winglam/openmrs-core/contents/{+path}","compare_url":"https://api.github.com/repos/winglam/openmrs-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/winglam/openmrs-core/merges","archive_url":"https://api.github.com/repos/winglam/openmrs-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/winglam/openmrs-core/downloads","issues_url":"https://api.github.com/repos/winglam/openmrs-core/issues{/number}","pulls_url":"https://api.github.com/repos/winglam/openmrs-core/pulls{/number}","milestones_url":"https://api.github.com/repos/winglam/openmrs-core/milestones{/number}","notifications_url":"https://api.github.com/repos/winglam/openmrs-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/winglam/openmrs-core/labels{/name}","releases_url":"https://api.github.com/repos/winglam/openmrs-core/releases{/id}","deployments_url":"https://api.github.com/repos/winglam/openmrs-core/deployments","created_at":"2016-02-25T21:43:20Z","updated_at":"2016-02-25T21:43:27Z","pushed_at":"2016-04-12T15:36:17Z","git_url":"git://github.com/winglam/openmrs-core.git","ssh_url":"git@github.com:winglam/openmrs-core.git","clone_url":"https://github.com/winglam/openmrs-core.git","svn_url":"https://github.com/winglam/openmrs-core","homepage":"http://openmrs.org","size":218632,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openmrs:master","ref":"master","sha":"1c222ff062363b65982935e2fb989aae527b5b2e","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-14T05:39:00Z","pushed_at":"2016-04-14T09:06:28Z","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":236953,"stargazers_count":321,"watchers_count":321,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1448,"mirror_url":null,"open_issues_count":6,"forks":1448,"open_issues":6,"watchers":321,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openmrs/openmrs-core/pulls/1760"},"html":{"href":"https://github.com/openmrs/openmrs-core/pull/1760"},"issue":{"href":"https://api.github.com/repos/openmrs/openmrs-core/issues/1760"},"comments":{"href":"https://api.github.com/repos/openmrs/openmrs-core/issues/1760/comments"},"review_comments":{"href":"https://api.github.com/repos/openmrs/openmrs-core/pulls/1760/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/1760/commits"},"statuses":{"href":"https://api.github.com/repos/openmrs/openmrs-core/statuses/4f4575ea3e5f161dfce652afcaebaa83ff01d1fe"}}}}