{"action":"created","comment":{"url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/pulls/comments/146179560","pull_request_review_id":71083629,"id":146179560,"diff_hunk":"@@ -0,0 +1,71 @@\n+package org.smartregister.tbr.activity;\n+\n+import android.app.Activity;\n+import android.content.Intent;\n+import android.util.Log;\n+import android.view.View;\n+import android.widget.TextView;\n+\n+import org.junit.After;\n+import org.junit.Before;\n+import org.junit.Test;\n+import org.robolectric.Robolectric;\n+import org.robolectric.RuntimeEnvironment;\n+import org.robolectric.android.controller.ActivityController;\n+import org.smartregister.tbr.BaseUnitTest;\n+import org.smartregister.tbr.R;\n+import org.smartregister.tbr.shadows.MenuItemTestVersion;\n+import org.smartregister.tbr.util.Constants;\n+\n+import java.util.ArrayList;\n+\n+/**\n+ * Created by ndegwamartin on 17/10/2017.\n+ */\n+public class HomeActivityTest extends BaseUnitTest {\n+\n+\n+    private ActivityController<HomeActivity> controller;\n+    private Activity activity;\n+\n+    @Before\n+    public void setUp() {\n+\n+        Intent intent = new Intent(RuntimeEnvironment.application, HomeActivity.class);\n+        intent.putExtra(Constants.INTENT_KEY.FULL_NAME, \"Test Guy\");\n+        controller = Robolectric.buildActivity(HomeActivity.class, intent);\n+        activity = controller.get();\n+        org.mockito.MockitoAnnotations.initMocks(this);\n+        controller.setup();\n+    }\n+\n+    @After\n+    public void tearDown() {\n+        destroyController();\n+    }\n+\n+    private void destroyController() {\n+        try {\n+            activity.finish();\n+            controller.pause().stop().destroy(); //destroy controller if we can\n+\n+        } catch (Exception e) {\n+            Log.e(getClass().getCanonicalName(), e.getMessage());\n+        }\n+    }\n+\n+    @Test\n+    public void homeActivityRendersCorrectUsernameInitialsOnCreate() {\n+        TextView textView = (TextView) activity.findViewById(R.id.custom_toolbar_logo_text);\n+        junit.framework.Assert.assertEquals(\"TG\", textView.getText());\n+    }\n+\n+    @Test\n+    public void shouldDisplayOnOptionsItemsMenuOnCreate() {","path":"opensrp-tbr/src/test/java/org/smartregister/tbr/activity/HomeActivityTest.java","position":64,"original_position":64,"commit_id":"1bba0b3becf84100fe7b9a02de7a2154093a51d3","original_commit_id":"1bba0b3becf84100fe7b9a02de7a2154093a51d3","user":{"login":"codacy-bot","id":19940114,"avatar_url":"https://avatars1.githubusercontent.com/u/19940114?v=4","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://www.codacy.com/assets/images/favicon.png) Issue found: [JUnit tests should include assert() or fail()](https://www.codacy.com/app/OpenSRP/opensrp-client-tbr/pullRequest?prid=987977)","created_at":"2017-10-23T07:08:47Z","updated_at":"2017-10-23T07:08:47Z","html_url":"https://github.com/OpenSRP/opensrp-client-tbr/pull/11#discussion_r146179560","pull_request_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/pulls/11","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/pulls/comments/146179560"},"html":{"href":"https://github.com/OpenSRP/opensrp-client-tbr/pull/11#discussion_r146179560"},"pull_request":{"href":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/pulls/11","id":146379817,"html_url":"https://github.com/OpenSRP/opensrp-client-tbr/pull/11","diff_url":"https://github.com/OpenSRP/opensrp-client-tbr/pull/11.diff","patch_url":"https://github.com/OpenSRP/opensrp-client-tbr/pull/11.patch","issue_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/issues/11","number":11,"state":"open","locked":false,"title":"Issue9,  Implement the user configurable home screen","user":{"login":"ndegwamartin","id":10017086,"avatar_url":"https://avatars0.githubusercontent.com/u/10017086?v=4","gravatar_id":"","url":"https://api.github.com/users/ndegwamartin","html_url":"https://github.com/ndegwamartin","followers_url":"https://api.github.com/users/ndegwamartin/followers","following_url":"https://api.github.com/users/ndegwamartin/following{/other_user}","gists_url":"https://api.github.com/users/ndegwamartin/gists{/gist_id}","starred_url":"https://api.github.com/users/ndegwamartin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndegwamartin/subscriptions","organizations_url":"https://api.github.com/users/ndegwamartin/orgs","repos_url":"https://api.github.com/users/ndegwamartin/repos","events_url":"https://api.github.com/users/ndegwamartin/events{/privacy}","received_events_url":"https://api.github.com/users/ndegwamartin/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-10-13T06:20:53Z","updated_at":"2017-10-23T07:08:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"154fd662c70f5a4667779637e91e96fb31ad5777","assignee":null,"assignees":[],"requested_reviewers":[{"login":"keymane","id":13656416,"avatar_url":"https://avatars3.githubusercontent.com/u/13656416?v=4","gravatar_id":"","url":"https://api.github.com/users/keymane","html_url":"https://github.com/keymane","followers_url":"https://api.github.com/users/keymane/followers","following_url":"https://api.github.com/users/keymane/following{/other_user}","gists_url":"https://api.github.com/users/keymane/gists{/gist_id}","starred_url":"https://api.github.com/users/keymane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keymane/subscriptions","organizations_url":"https://api.github.com/users/keymane/orgs","repos_url":"https://api.github.com/users/keymane/repos","events_url":"https://api.github.com/users/keymane/events{/privacy}","received_events_url":"https://api.github.com/users/keymane/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/pulls/11/commits","review_comments_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/pulls/11/comments","review_comment_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/issues/11/comments","statuses_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/statuses/1bba0b3becf84100fe7b9a02de7a2154093a51d3","head":{"label":"OpenSRP:issue9","ref":"issue9","sha":"1bba0b3becf84100fe7b9a02de7a2154093a51d3","user":{"login":"OpenSRP","id":7898027,"avatar_url":"https://avatars1.githubusercontent.com/u/7898027?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenSRP","html_url":"https://github.com/OpenSRP","followers_url":"https://api.github.com/users/OpenSRP/followers","following_url":"https://api.github.com/users/OpenSRP/following{/other_user}","gists_url":"https://api.github.com/users/OpenSRP/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenSRP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenSRP/subscriptions","organizations_url":"https://api.github.com/users/OpenSRP/orgs","repos_url":"https://api.github.com/users/OpenSRP/repos","events_url":"https://api.github.com/users/OpenSRP/events{/privacy}","received_events_url":"https://api.github.com/users/OpenSRP/received_events","type":"Organization","site_admin":false},"repo":{"id":90995053,"name":"opensrp-client-tbr","full_name":"OpenSRP/opensrp-client-tbr","owner":{"login":"OpenSRP","id":7898027,"avatar_url":"https://avatars1.githubusercontent.com/u/7898027?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenSRP","html_url":"https://github.com/OpenSRP","followers_url":"https://api.github.com/users/OpenSRP/followers","following_url":"https://api.github.com/users/OpenSRP/following{/other_user}","gists_url":"https://api.github.com/users/OpenSRP/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenSRP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenSRP/subscriptions","organizations_url":"https://api.github.com/users/OpenSRP/orgs","repos_url":"https://api.github.com/users/OpenSRP/repos","events_url":"https://api.github.com/users/OpenSRP/events{/privacy}","received_events_url":"https://api.github.com/users/OpenSRP/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OpenSRP/opensrp-client-tbr","description":null,"fork":false,"url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr","forks_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/forks","keys_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/teams","hooks_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/hooks","issue_events_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/issues/events{/number}","events_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/events","assignees_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/assignees{/user}","branches_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/branches{/branch}","tags_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/tags","blobs_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/languages","stargazers_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/stargazers","contributors_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/contributors","subscribers_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/subscribers","subscription_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/subscription","commits_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/issues/comments{/number}","contents_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/contents/{+path}","compare_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/merges","archive_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/downloads","issues_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/issues{/number}","pulls_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/labels{/name}","releases_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/releases{/id}","deployments_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/deployments","created_at":"2017-05-11T15:29:49Z","updated_at":"2017-08-24T09:41:10Z","pushed_at":"2017-10-23T07:02:58Z","git_url":"git://github.com/OpenSRP/opensrp-client-tbr.git","ssh_url":"git@github.com:OpenSRP/opensrp-client-tbr.git","clone_url":"https://github.com/OpenSRP/opensrp-client-tbr.git","svn_url":"https://github.com/OpenSRP/opensrp-client-tbr","homepage":null,"size":1805,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":14,"forks":1,"open_issues":14,"watchers":1,"default_branch":"master"}},"base":{"label":"OpenSRP:master","ref":"master","sha":"1c1031f1baa325d94bba704c6a1003bb8a1a2eac","user":{"login":"OpenSRP","id":7898027,"avatar_url":"https://avatars1.githubusercontent.com/u/7898027?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenSRP","html_url":"https://github.com/OpenSRP","followers_url":"https://api.github.com/users/OpenSRP/followers","following_url":"https://api.github.com/users/OpenSRP/following{/other_user}","gists_url":"https://api.github.com/users/OpenSRP/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenSRP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenSRP/subscriptions","organizations_url":"https://api.github.com/users/OpenSRP/orgs","repos_url":"https://api.github.com/users/OpenSRP/repos","events_url":"https://api.github.com/users/OpenSRP/events{/privacy}","received_events_url":"https://api.github.com/users/OpenSRP/received_events","type":"Organization","site_admin":false},"repo":{"id":90995053,"name":"opensrp-client-tbr","full_name":"OpenSRP/opensrp-client-tbr","owner":{"login":"OpenSRP","id":7898027,"avatar_url":"https://avatars1.githubusercontent.com/u/7898027?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenSRP","html_url":"https://github.com/OpenSRP","followers_url":"https://api.github.com/users/OpenSRP/followers","following_url":"https://api.github.com/users/OpenSRP/following{/other_user}","gists_url":"https://api.github.com/users/OpenSRP/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenSRP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenSRP/subscriptions","organizations_url":"https://api.github.com/users/OpenSRP/orgs","repos_url":"https://api.github.com/users/OpenSRP/repos","events_url":"https://api.github.com/users/OpenSRP/events{/privacy}","received_events_url":"https://api.github.com/users/OpenSRP/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OpenSRP/opensrp-client-tbr","description":null,"fork":false,"url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr","forks_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/forks","keys_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/teams","hooks_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/hooks","issue_events_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/issues/events{/number}","events_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/events","assignees_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/assignees{/user}","branches_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/branches{/branch}","tags_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/tags","blobs_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/languages","stargazers_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/stargazers","contributors_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/contributors","subscribers_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/subscribers","subscription_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/subscription","commits_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/issues/comments{/number}","contents_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/contents/{+path}","compare_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/merges","archive_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/downloads","issues_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/issues{/number}","pulls_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/labels{/name}","releases_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/releases{/id}","deployments_url":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/deployments","created_at":"2017-05-11T15:29:49Z","updated_at":"2017-08-24T09:41:10Z","pushed_at":"2017-10-23T07:02:58Z","git_url":"git://github.com/OpenSRP/opensrp-client-tbr.git","ssh_url":"git@github.com:OpenSRP/opensrp-client-tbr.git","clone_url":"https://github.com/OpenSRP/opensrp-client-tbr.git","svn_url":"https://github.com/OpenSRP/opensrp-client-tbr","homepage":null,"size":1805,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":14,"forks":1,"open_issues":14,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/pulls/11"},"html":{"href":"https://github.com/OpenSRP/opensrp-client-tbr/pull/11"},"issue":{"href":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/issues/11"},"comments":{"href":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/OpenSRP/opensrp-client-tbr/statuses/1bba0b3becf84100fe7b9a02de7a2154093a51d3"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"codacy-bot"}}