{"action":"created","comment":{"url":"https://api.github.com/repos/RandoApp/Rando-android/pulls/comments/70288147","id":70288147,"diff_hunk":"@@ -0,0 +1,66 @@\n+package com.github.randoapp.test.db;\n+\n+import android.test.AndroidTestCase;\n+import android.test.suitebuilder.annotation.SmallTest;\n+\n+import com.github.randoapp.db.model.Rando;\n+\n+import org.hamcrest.Matchers;\n+\n+import java.util.Collections;\n+import java.util.Date;\n+import java.util.List;\n+\n+import static org.hamcrest.CoreMatchers.is;\n+import static org.hamcrest.CoreMatchers.notNullValue;\n+import static org.hamcrest.MatcherAssert.assertThat;\n+\n+public class RandoTest extends AndroidTestCase {\n+\n+    @SmallTest\n+    public void testRandoPairUsersNotNull() {\n+        Rando rando = new Rando();\n+        assertThat(rando, notNullValue());\n+    }\n+\n+    @SmallTest\n+    public void testDateEqual() {\n+        Date date = new Date();\n+        Rando rando1 = RandoTestHelper.getRandomRando(Rando.Status.IN);\n+        Rando rando2 = RandoTestHelper.getRandomRando(Rando.Status.IN);\n+        rando1.date = date;\n+        rando2.date = date;\n+        assertThat(\"Equal Rando dates doesn't return 0 on compare.\", new Rando.DateComparator().compare(rando2, rando1), is(0));\n+    }\n+\n+    @SmallTest\n+    public void testDateLowerThan() {\n+        Date date1 = new Date();\n+        Date date2 = new Date();\n+        date2.setTime(date1.getTime() - 100);\n+        Rando rando1 = RandoTestHelper.getRandomRando(Rando.Status.IN);\n+        Rando rando2 = RandoTestHelper.getRandomRando(Rando.Status.IN);\n+        rando1.date = date1;\n+        rando2.date = date2;\n+        assertThat(\"RandoPairs comparation failed\", new Rando.DateComparator().compare(rando2, rando1), Matchers.greaterThan(0));\n+    }\n+\n+    @SmallTest\n+    public void testDateGreaterThan() {\n+        Date date1 = new Date();\n+        Date date2 = new Date();\n+        date2.setTime(date1.getTime() + 100);\n+        Rando rando1 = RandoTestHelper.getRandomRando(Rando.Status.IN);\n+        Rando rando2 = RandoTestHelper.getRandomRando(Rando.Status.IN);\n+        rando1.date = date1;\n+        rando2.date = date2;\n+        assertThat(\"RandoPairs comparation failed\", new Rando.DateComparator().compare(rando2, rando1), Matchers.lessThan(0));\n+    }\n+\n+    @SmallTest\n+    public void testDateSortability() {","path":"src/androidTest/java/com/github/randoapp/test/db/RandoTest.java","position":61,"original_position":61,"commit_id":"5ae7fb08c900bd18db32654b10f6f88e958de387","original_commit_id":"5ae7fb08c900bd18db32654b10f6f88e958de387","user":{"login":"codacy-bot","id":19940114,"avatar_url":"https://avatars.githubusercontent.com/u/19940114?v=3","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/RandoApp/Rando-android/file/2957696381/issues/source?bid=3392774&fileBranchId=3412531#l61)","created_at":"2016-07-11T16:12:29Z","updated_at":"2016-07-11T16:12:29Z","html_url":"https://github.com/RandoApp/Rando-android/pull/220#discussion_r70288147","pull_request_url":"https://api.github.com/repos/RandoApp/Rando-android/pulls/220","_links":{"self":{"href":"https://api.github.com/repos/RandoApp/Rando-android/pulls/comments/70288147"},"html":{"href":"https://github.com/RandoApp/Rando-android/pull/220#discussion_r70288147"},"pull_request":{"href":"https://api.github.com/repos/RandoApp/Rando-android/pulls/220"}}},"pull_request":{"url":"https://api.github.com/repos/RandoApp/Rando-android/pulls/220","id":76565363,"html_url":"https://github.com/RandoApp/Rando-android/pull/220","diff_url":"https://github.com/RandoApp/Rando-android/pull/220.diff","patch_url":"https://github.com/RandoApp/Rando-android/pull/220.patch","issue_url":"https://api.github.com/repos/RandoApp/Rando-android/issues/220","number":220,"state":"open","locked":false,"title":"New API","user":{"login":"xp-vit","id":2340581,"avatar_url":"https://avatars.githubusercontent.com/u/2340581?v=3","gravatar_id":"","url":"https://api.github.com/users/xp-vit","html_url":"https://github.com/xp-vit","followers_url":"https://api.github.com/users/xp-vit/followers","following_url":"https://api.github.com/users/xp-vit/following{/other_user}","gists_url":"https://api.github.com/users/xp-vit/gists{/gist_id}","starred_url":"https://api.github.com/users/xp-vit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xp-vit/subscriptions","organizations_url":"https://api.github.com/users/xp-vit/orgs","repos_url":"https://api.github.com/users/xp-vit/repos","events_url":"https://api.github.com/users/xp-vit/events{/privacy}","received_events_url":"https://api.github.com/users/xp-vit/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-07-07T09:34:11Z","updated_at":"2016-07-11T16:12:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"db60713acc0ecfb75a0f5cee54bd05c11710d2a0","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/RandoApp/Rando-android/pulls/220/commits","review_comments_url":"https://api.github.com/repos/RandoApp/Rando-android/pulls/220/comments","review_comment_url":"https://api.github.com/repos/RandoApp/Rando-android/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RandoApp/Rando-android/issues/220/comments","statuses_url":"https://api.github.com/repos/RandoApp/Rando-android/statuses/5ae7fb08c900bd18db32654b10f6f88e958de387","head":{"label":"RandoApp:randopair-to-rando","ref":"randopair-to-rando","sha":"5ae7fb08c900bd18db32654b10f6f88e958de387","user":{"login":"RandoApp","id":7382647,"avatar_url":"https://avatars.githubusercontent.com/u/7382647?v=3","gravatar_id":"","url":"https://api.github.com/users/RandoApp","html_url":"https://github.com/RandoApp","followers_url":"https://api.github.com/users/RandoApp/followers","following_url":"https://api.github.com/users/RandoApp/following{/other_user}","gists_url":"https://api.github.com/users/RandoApp/gists{/gist_id}","starred_url":"https://api.github.com/users/RandoApp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RandoApp/subscriptions","organizations_url":"https://api.github.com/users/RandoApp/orgs","repos_url":"https://api.github.com/users/RandoApp/repos","events_url":"https://api.github.com/users/RandoApp/events{/privacy}","received_events_url":"https://api.github.com/users/RandoApp/received_events","type":"Organization","site_admin":false},"repo":{"id":13869731,"name":"Rando-android","full_name":"RandoApp/Rando-android","owner":{"login":"RandoApp","id":7382647,"avatar_url":"https://avatars.githubusercontent.com/u/7382647?v=3","gravatar_id":"","url":"https://api.github.com/users/RandoApp","html_url":"https://github.com/RandoApp","followers_url":"https://api.github.com/users/RandoApp/followers","following_url":"https://api.github.com/users/RandoApp/following{/other_user}","gists_url":"https://api.github.com/users/RandoApp/gists{/gist_id}","starred_url":"https://api.github.com/users/RandoApp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RandoApp/subscriptions","organizations_url":"https://api.github.com/users/RandoApp/orgs","repos_url":"https://api.github.com/users/RandoApp/repos","events_url":"https://api.github.com/users/RandoApp/events{/privacy}","received_events_url":"https://api.github.com/users/RandoApp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RandoApp/Rando-android","description":"Android client for Rando, where you can give, receive and collect unique photos from random people from all over the world","fork":false,"url":"https://api.github.com/repos/RandoApp/Rando-android","forks_url":"https://api.github.com/repos/RandoApp/Rando-android/forks","keys_url":"https://api.github.com/repos/RandoApp/Rando-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RandoApp/Rando-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RandoApp/Rando-android/teams","hooks_url":"https://api.github.com/repos/RandoApp/Rando-android/hooks","issue_events_url":"https://api.github.com/repos/RandoApp/Rando-android/issues/events{/number}","events_url":"https://api.github.com/repos/RandoApp/Rando-android/events","assignees_url":"https://api.github.com/repos/RandoApp/Rando-android/assignees{/user}","branches_url":"https://api.github.com/repos/RandoApp/Rando-android/branches{/branch}","tags_url":"https://api.github.com/repos/RandoApp/Rando-android/tags","blobs_url":"https://api.github.com/repos/RandoApp/Rando-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RandoApp/Rando-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RandoApp/Rando-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/RandoApp/Rando-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RandoApp/Rando-android/statuses/{sha}","languages_url":"https://api.github.com/repos/RandoApp/Rando-android/languages","stargazers_url":"https://api.github.com/repos/RandoApp/Rando-android/stargazers","contributors_url":"https://api.github.com/repos/RandoApp/Rando-android/contributors","subscribers_url":"https://api.github.com/repos/RandoApp/Rando-android/subscribers","subscription_url":"https://api.github.com/repos/RandoApp/Rando-android/subscription","commits_url":"https://api.github.com/repos/RandoApp/Rando-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/RandoApp/Rando-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/RandoApp/Rando-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/RandoApp/Rando-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/RandoApp/Rando-android/contents/{+path}","compare_url":"https://api.github.com/repos/RandoApp/Rando-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RandoApp/Rando-android/merges","archive_url":"https://api.github.com/repos/RandoApp/Rando-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RandoApp/Rando-android/downloads","issues_url":"https://api.github.com/repos/RandoApp/Rando-android/issues{/number}","pulls_url":"https://api.github.com/repos/RandoApp/Rando-android/pulls{/number}","milestones_url":"https://api.github.com/repos/RandoApp/Rando-android/milestones{/number}","notifications_url":"https://api.github.com/repos/RandoApp/Rando-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RandoApp/Rando-android/labels{/name}","releases_url":"https://api.github.com/repos/RandoApp/Rando-android/releases{/id}","deployments_url":"https://api.github.com/repos/RandoApp/Rando-android/deployments","created_at":"2013-10-25T19:09:39Z","updated_at":"2016-03-16T09:36:07Z","pushed_at":"2016-07-11T16:11:01Z","git_url":"git://github.com/RandoApp/Rando-android.git","ssh_url":"git@github.com:RandoApp/Rando-android.git","clone_url":"https://github.com/RandoApp/Rando-android.git","svn_url":"https://github.com/RandoApp/Rando-android","homepage":"https://rando4.me","size":2874,"stargazers_count":9,"watchers_count":9,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":65,"forks":6,"open_issues":65,"watchers":9,"default_branch":"master"}},"base":{"label":"RandoApp:master","ref":"master","sha":"0a1e230c793b77d45e8267a413ff541eef513ab6","user":{"login":"RandoApp","id":7382647,"avatar_url":"https://avatars.githubusercontent.com/u/7382647?v=3","gravatar_id":"","url":"https://api.github.com/users/RandoApp","html_url":"https://github.com/RandoApp","followers_url":"https://api.github.com/users/RandoApp/followers","following_url":"https://api.github.com/users/RandoApp/following{/other_user}","gists_url":"https://api.github.com/users/RandoApp/gists{/gist_id}","starred_url":"https://api.github.com/users/RandoApp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RandoApp/subscriptions","organizations_url":"https://api.github.com/users/RandoApp/orgs","repos_url":"https://api.github.com/users/RandoApp/repos","events_url":"https://api.github.com/users/RandoApp/events{/privacy}","received_events_url":"https://api.github.com/users/RandoApp/received_events","type":"Organization","site_admin":false},"repo":{"id":13869731,"name":"Rando-android","full_name":"RandoApp/Rando-android","owner":{"login":"RandoApp","id":7382647,"avatar_url":"https://avatars.githubusercontent.com/u/7382647?v=3","gravatar_id":"","url":"https://api.github.com/users/RandoApp","html_url":"https://github.com/RandoApp","followers_url":"https://api.github.com/users/RandoApp/followers","following_url":"https://api.github.com/users/RandoApp/following{/other_user}","gists_url":"https://api.github.com/users/RandoApp/gists{/gist_id}","starred_url":"https://api.github.com/users/RandoApp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RandoApp/subscriptions","organizations_url":"https://api.github.com/users/RandoApp/orgs","repos_url":"https://api.github.com/users/RandoApp/repos","events_url":"https://api.github.com/users/RandoApp/events{/privacy}","received_events_url":"https://api.github.com/users/RandoApp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RandoApp/Rando-android","description":"Android client for Rando, where you can give, receive and collect unique photos from random people from all over the world","fork":false,"url":"https://api.github.com/repos/RandoApp/Rando-android","forks_url":"https://api.github.com/repos/RandoApp/Rando-android/forks","keys_url":"https://api.github.com/repos/RandoApp/Rando-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RandoApp/Rando-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RandoApp/Rando-android/teams","hooks_url":"https://api.github.com/repos/RandoApp/Rando-android/hooks","issue_events_url":"https://api.github.com/repos/RandoApp/Rando-android/issues/events{/number}","events_url":"https://api.github.com/repos/RandoApp/Rando-android/events","assignees_url":"https://api.github.com/repos/RandoApp/Rando-android/assignees{/user}","branches_url":"https://api.github.com/repos/RandoApp/Rando-android/branches{/branch}","tags_url":"https://api.github.com/repos/RandoApp/Rando-android/tags","blobs_url":"https://api.github.com/repos/RandoApp/Rando-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RandoApp/Rando-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RandoApp/Rando-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/RandoApp/Rando-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RandoApp/Rando-android/statuses/{sha}","languages_url":"https://api.github.com/repos/RandoApp/Rando-android/languages","stargazers_url":"https://api.github.com/repos/RandoApp/Rando-android/stargazers","contributors_url":"https://api.github.com/repos/RandoApp/Rando-android/contributors","subscribers_url":"https://api.github.com/repos/RandoApp/Rando-android/subscribers","subscription_url":"https://api.github.com/repos/RandoApp/Rando-android/subscription","commits_url":"https://api.github.com/repos/RandoApp/Rando-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/RandoApp/Rando-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/RandoApp/Rando-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/RandoApp/Rando-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/RandoApp/Rando-android/contents/{+path}","compare_url":"https://api.github.com/repos/RandoApp/Rando-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RandoApp/Rando-android/merges","archive_url":"https://api.github.com/repos/RandoApp/Rando-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RandoApp/Rando-android/downloads","issues_url":"https://api.github.com/repos/RandoApp/Rando-android/issues{/number}","pulls_url":"https://api.github.com/repos/RandoApp/Rando-android/pulls{/number}","milestones_url":"https://api.github.com/repos/RandoApp/Rando-android/milestones{/number}","notifications_url":"https://api.github.com/repos/RandoApp/Rando-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RandoApp/Rando-android/labels{/name}","releases_url":"https://api.github.com/repos/RandoApp/Rando-android/releases{/id}","deployments_url":"https://api.github.com/repos/RandoApp/Rando-android/deployments","created_at":"2013-10-25T19:09:39Z","updated_at":"2016-03-16T09:36:07Z","pushed_at":"2016-07-11T16:11:01Z","git_url":"git://github.com/RandoApp/Rando-android.git","ssh_url":"git@github.com:RandoApp/Rando-android.git","clone_url":"https://github.com/RandoApp/Rando-android.git","svn_url":"https://github.com/RandoApp/Rando-android","homepage":"https://rando4.me","size":2874,"stargazers_count":9,"watchers_count":9,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":65,"forks":6,"open_issues":65,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RandoApp/Rando-android/pulls/220"},"html":{"href":"https://github.com/RandoApp/Rando-android/pull/220"},"issue":{"href":"https://api.github.com/repos/RandoApp/Rando-android/issues/220"},"comments":{"href":"https://api.github.com/repos/RandoApp/Rando-android/issues/220/comments"},"review_comments":{"href":"https://api.github.com/repos/RandoApp/Rando-android/pulls/220/comments"},"review_comment":{"href":"https://api.github.com/repos/RandoApp/Rando-android/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RandoApp/Rando-android/pulls/220/commits"},"statuses":{"href":"https://api.github.com/repos/RandoApp/Rando-android/statuses/5ae7fb08c900bd18db32654b10f6f88e958de387"}}}}
{"actor":{"display_login":"codacy-bot"}}