{"action":"created","comment":{"url":"https://api.github.com/repos/Qabel/qabel-android/pulls/comments/65880373","id":65880373,"diff_hunk":"@@ -0,0 +1,61 @@\n+package de.qabel.qabelbox.storage.server;\n+\n+import android.support.annotation.Nullable;\n+\n+import org.junit.Before;\n+import org.junit.Test;\n+import org.junit.runner.RunWith;\n+import org.robolectric.RobolectricGradleTestRunner;\n+import org.robolectric.RuntimeEnvironment;\n+import org.robolectric.annotation.Config;\n+\n+import de.qabel.qabelbox.BuildConfig;\n+import de.qabel.qabelbox.SimpleApplication;\n+import de.qabel.qabelbox.communication.callbacks.JSONModelCallback;\n+import de.qabel.qabelbox.config.AppPreference;\n+import de.qabel.qabelbox.storage.model.BoxQuota;\n+import de.qabel.qabelbox.util.TestHelper;\n+import okhttp3.Response;\n+\n+import static junit.framework.Assert.assertEquals;\n+\n+@RunWith(RobolectricGradleTestRunner.class)\n+@Config(application = SimpleApplication.class, constants = BuildConfig.class)\n+public class BlockServerTest {\n+\n+    private static final long DEFAULT_QUOTA = 2147483648L;\n+\n+    private BlockServer blockServer;\n+\n+    @Before\n+    public void setUp() {\n+        blockServer = new AndroidBlockServer(new AppPreference(RuntimeEnvironment.application),\n+                RuntimeEnvironment.application);\n+    }\n+\n+    @Test\n+    public void testQuota() throws Exception {\n+        BoxQuota[] quota = new BoxQuota[1];\n+        blockServer.getQuota(new JSONModelCallback<BoxQuota>() {\n+            @Override\n+            protected void onSuccess(Response response, BoxQuota model) {\n+                quota[0] = model;\n+            }\n+\n+            @Override\n+            protected BoxQuota createModel() {\n+                return new BoxQuota();\n+            }\n+\n+            @Override\n+            protected void onError(Exception e, @Nullable Response response) {\n+                //Should not happen\n+            }\n+        });\n+        TestHelper.waitUntil(() -> quota[0] != null, \"Error waiting for request!\");\n+\n+        BoxQuota boxQuota = quota[0];\n+        assertEquals(DEFAULT_QUOTA, boxQuota.getQuota());","path":"qabelbox/src/test/java/de/qabel/qabelbox/storage/server/BlockServerTest.java","position":58,"original_position":58,"commit_id":"68087efd992f8bad5e10ab654fe9be4792dc789c","original_commit_id":"68087efd992f8bad5e10ab654fe9be4792dc789c","user":{"login":"JoGir","id":16522130,"avatar_url":"https://avatars.githubusercontent.com/u/16522130?v=3","gravatar_id":"","url":"https://api.github.com/users/JoGir","html_url":"https://github.com/JoGir","followers_url":"https://api.github.com/users/JoGir/followers","following_url":"https://api.github.com/users/JoGir/following{/other_user}","gists_url":"https://api.github.com/users/JoGir/gists{/gist_id}","starred_url":"https://api.github.com/users/JoGir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoGir/subscriptions","organizations_url":"https://api.github.com/users/JoGir/orgs","repos_url":"https://api.github.com/users/JoGir/repos","events_url":"https://api.github.com/users/JoGir/events{/privacy}","received_events_url":"https://api.github.com/users/JoGir/received_events","type":"User","site_admin":false},"body":"I'll add a mockImpl for the block-server interface","created_at":"2016-06-06T12:20:30Z","updated_at":"2016-06-06T12:20:30Z","html_url":"https://github.com/Qabel/qabel-android/pull/542#discussion_r65880373","pull_request_url":"https://api.github.com/repos/Qabel/qabel-android/pulls/542","_links":{"self":{"href":"https://api.github.com/repos/Qabel/qabel-android/pulls/comments/65880373"},"html":{"href":"https://github.com/Qabel/qabel-android/pull/542#discussion_r65880373"},"pull_request":{"href":"https://api.github.com/repos/Qabel/qabel-android/pulls/542"}}},"pull_request":{"url":"https://api.github.com/repos/Qabel/qabel-android/pulls/542","id":72613268,"html_url":"https://github.com/Qabel/qabel-android/pull/542","diff_url":"https://github.com/Qabel/qabel-android/pull/542.diff","patch_url":"https://github.com/Qabel/qabel-android/pull/542.patch","issue_url":"https://api.github.com/repos/Qabel/qabel-android/issues/542","number":542,"state":"open","locked":false,"title":"Storage quota","user":{"login":"JoGir","id":16522130,"avatar_url":"https://avatars.githubusercontent.com/u/16522130?v=3","gravatar_id":"","url":"https://api.github.com/users/JoGir","html_url":"https://github.com/JoGir","followers_url":"https://api.github.com/users/JoGir/followers","following_url":"https://api.github.com/users/JoGir/following{/other_user}","gists_url":"https://api.github.com/users/JoGir/gists{/gist_id}","starred_url":"https://api.github.com/users/JoGir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoGir/subscriptions","organizations_url":"https://api.github.com/users/JoGir/orgs","repos_url":"https://api.github.com/users/JoGir/repos","events_url":"https://api.github.com/users/JoGir/events{/privacy}","received_events_url":"https://api.github.com/users/JoGir/received_events","type":"User","site_admin":false},"body":"Resolves #46","created_at":"2016-06-04T21:13:46Z","updated_at":"2016-06-06T12:20:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f8f274f60432d2a58531ff3ba70dbfa7b84e2c2f","assignee":{"login":"JoGir","id":16522130,"avatar_url":"https://avatars.githubusercontent.com/u/16522130?v=3","gravatar_id":"","url":"https://api.github.com/users/JoGir","html_url":"https://github.com/JoGir","followers_url":"https://api.github.com/users/JoGir/followers","following_url":"https://api.github.com/users/JoGir/following{/other_user}","gists_url":"https://api.github.com/users/JoGir/gists{/gist_id}","starred_url":"https://api.github.com/users/JoGir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoGir/subscriptions","organizations_url":"https://api.github.com/users/JoGir/orgs","repos_url":"https://api.github.com/users/JoGir/repos","events_url":"https://api.github.com/users/JoGir/events{/privacy}","received_events_url":"https://api.github.com/users/JoGir/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/Qabel/qabel-android/pulls/542/commits","review_comments_url":"https://api.github.com/repos/Qabel/qabel-android/pulls/542/comments","review_comment_url":"https://api.github.com/repos/Qabel/qabel-android/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Qabel/qabel-android/issues/542/comments","statuses_url":"https://api.github.com/repos/Qabel/qabel-android/statuses/68087efd992f8bad5e10ab654fe9be4792dc789c","head":{"label":"JoGir:storage_quota","ref":"storage_quota","sha":"68087efd992f8bad5e10ab654fe9be4792dc789c","user":{"login":"JoGir","id":16522130,"avatar_url":"https://avatars.githubusercontent.com/u/16522130?v=3","gravatar_id":"","url":"https://api.github.com/users/JoGir","html_url":"https://github.com/JoGir","followers_url":"https://api.github.com/users/JoGir/followers","following_url":"https://api.github.com/users/JoGir/following{/other_user}","gists_url":"https://api.github.com/users/JoGir/gists{/gist_id}","starred_url":"https://api.github.com/users/JoGir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoGir/subscriptions","organizations_url":"https://api.github.com/users/JoGir/orgs","repos_url":"https://api.github.com/users/JoGir/repos","events_url":"https://api.github.com/users/JoGir/events{/privacy}","received_events_url":"https://api.github.com/users/JoGir/received_events","type":"User","site_admin":false},"repo":{"id":53146477,"name":"qabel-android","full_name":"JoGir/qabel-android","owner":{"login":"JoGir","id":16522130,"avatar_url":"https://avatars.githubusercontent.com/u/16522130?v=3","gravatar_id":"","url":"https://api.github.com/users/JoGir","html_url":"https://github.com/JoGir","followers_url":"https://api.github.com/users/JoGir/followers","following_url":"https://api.github.com/users/JoGir/following{/other_user}","gists_url":"https://api.github.com/users/JoGir/gists{/gist_id}","starred_url":"https://api.github.com/users/JoGir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoGir/subscriptions","organizations_url":"https://api.github.com/users/JoGir/orgs","repos_url":"https://api.github.com/users/JoGir/repos","events_url":"https://api.github.com/users/JoGir/events{/privacy}","received_events_url":"https://api.github.com/users/JoGir/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JoGir/qabel-android","description":"Android Frontend of Qabel","fork":true,"url":"https://api.github.com/repos/JoGir/qabel-android","forks_url":"https://api.github.com/repos/JoGir/qabel-android/forks","keys_url":"https://api.github.com/repos/JoGir/qabel-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JoGir/qabel-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JoGir/qabel-android/teams","hooks_url":"https://api.github.com/repos/JoGir/qabel-android/hooks","issue_events_url":"https://api.github.com/repos/JoGir/qabel-android/issues/events{/number}","events_url":"https://api.github.com/repos/JoGir/qabel-android/events","assignees_url":"https://api.github.com/repos/JoGir/qabel-android/assignees{/user}","branches_url":"https://api.github.com/repos/JoGir/qabel-android/branches{/branch}","tags_url":"https://api.github.com/repos/JoGir/qabel-android/tags","blobs_url":"https://api.github.com/repos/JoGir/qabel-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JoGir/qabel-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JoGir/qabel-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/JoGir/qabel-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JoGir/qabel-android/statuses/{sha}","languages_url":"https://api.github.com/repos/JoGir/qabel-android/languages","stargazers_url":"https://api.github.com/repos/JoGir/qabel-android/stargazers","contributors_url":"https://api.github.com/repos/JoGir/qabel-android/contributors","subscribers_url":"https://api.github.com/repos/JoGir/qabel-android/subscribers","subscription_url":"https://api.github.com/repos/JoGir/qabel-android/subscription","commits_url":"https://api.github.com/repos/JoGir/qabel-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/JoGir/qabel-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/JoGir/qabel-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/JoGir/qabel-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/JoGir/qabel-android/contents/{+path}","compare_url":"https://api.github.com/repos/JoGir/qabel-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JoGir/qabel-android/merges","archive_url":"https://api.github.com/repos/JoGir/qabel-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JoGir/qabel-android/downloads","issues_url":"https://api.github.com/repos/JoGir/qabel-android/issues{/number}","pulls_url":"https://api.github.com/repos/JoGir/qabel-android/pulls{/number}","milestones_url":"https://api.github.com/repos/JoGir/qabel-android/milestones{/number}","notifications_url":"https://api.github.com/repos/JoGir/qabel-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JoGir/qabel-android/labels{/name}","releases_url":"https://api.github.com/repos/JoGir/qabel-android/releases{/id}","deployments_url":"https://api.github.com/repos/JoGir/qabel-android/deployments","created_at":"2016-03-04T15:50:34Z","updated_at":"2016-03-04T15:50:35Z","pushed_at":"2016-06-04T21:26:45Z","git_url":"git://github.com/JoGir/qabel-android.git","ssh_url":"git@github.com:JoGir/qabel-android.git","clone_url":"https://github.com/JoGir/qabel-android.git","svn_url":"https://github.com/JoGir/qabel-android","homepage":"","size":6992,"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":"Qabel:master","ref":"master","sha":"1cf5ad61382585a794a4d11af72cbab2be09f988","user":{"login":"Qabel","id":7711470,"avatar_url":"https://avatars.githubusercontent.com/u/7711470?v=3","gravatar_id":"","url":"https://api.github.com/users/Qabel","html_url":"https://github.com/Qabel","followers_url":"https://api.github.com/users/Qabel/followers","following_url":"https://api.github.com/users/Qabel/following{/other_user}","gists_url":"https://api.github.com/users/Qabel/gists{/gist_id}","starred_url":"https://api.github.com/users/Qabel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Qabel/subscriptions","organizations_url":"https://api.github.com/users/Qabel/orgs","repos_url":"https://api.github.com/users/Qabel/repos","events_url":"https://api.github.com/users/Qabel/events{/privacy}","received_events_url":"https://api.github.com/users/Qabel/received_events","type":"Organization","site_admin":false},"repo":{"id":37848561,"name":"qabel-android","full_name":"Qabel/qabel-android","owner":{"login":"Qabel","id":7711470,"avatar_url":"https://avatars.githubusercontent.com/u/7711470?v=3","gravatar_id":"","url":"https://api.github.com/users/Qabel","html_url":"https://github.com/Qabel","followers_url":"https://api.github.com/users/Qabel/followers","following_url":"https://api.github.com/users/Qabel/following{/other_user}","gists_url":"https://api.github.com/users/Qabel/gists{/gist_id}","starred_url":"https://api.github.com/users/Qabel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Qabel/subscriptions","organizations_url":"https://api.github.com/users/Qabel/orgs","repos_url":"https://api.github.com/users/Qabel/repos","events_url":"https://api.github.com/users/Qabel/events{/privacy}","received_events_url":"https://api.github.com/users/Qabel/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Qabel/qabel-android","description":":iphone: Android Frontend of Qabel","fork":false,"url":"https://api.github.com/repos/Qabel/qabel-android","forks_url":"https://api.github.com/repos/Qabel/qabel-android/forks","keys_url":"https://api.github.com/repos/Qabel/qabel-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Qabel/qabel-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Qabel/qabel-android/teams","hooks_url":"https://api.github.com/repos/Qabel/qabel-android/hooks","issue_events_url":"https://api.github.com/repos/Qabel/qabel-android/issues/events{/number}","events_url":"https://api.github.com/repos/Qabel/qabel-android/events","assignees_url":"https://api.github.com/repos/Qabel/qabel-android/assignees{/user}","branches_url":"https://api.github.com/repos/Qabel/qabel-android/branches{/branch}","tags_url":"https://api.github.com/repos/Qabel/qabel-android/tags","blobs_url":"https://api.github.com/repos/Qabel/qabel-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Qabel/qabel-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Qabel/qabel-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/Qabel/qabel-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Qabel/qabel-android/statuses/{sha}","languages_url":"https://api.github.com/repos/Qabel/qabel-android/languages","stargazers_url":"https://api.github.com/repos/Qabel/qabel-android/stargazers","contributors_url":"https://api.github.com/repos/Qabel/qabel-android/contributors","subscribers_url":"https://api.github.com/repos/Qabel/qabel-android/subscribers","subscription_url":"https://api.github.com/repos/Qabel/qabel-android/subscription","commits_url":"https://api.github.com/repos/Qabel/qabel-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/Qabel/qabel-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/Qabel/qabel-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/Qabel/qabel-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/Qabel/qabel-android/contents/{+path}","compare_url":"https://api.github.com/repos/Qabel/qabel-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Qabel/qabel-android/merges","archive_url":"https://api.github.com/repos/Qabel/qabel-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Qabel/qabel-android/downloads","issues_url":"https://api.github.com/repos/Qabel/qabel-android/issues{/number}","pulls_url":"https://api.github.com/repos/Qabel/qabel-android/pulls{/number}","milestones_url":"https://api.github.com/repos/Qabel/qabel-android/milestones{/number}","notifications_url":"https://api.github.com/repos/Qabel/qabel-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Qabel/qabel-android/labels{/name}","releases_url":"https://api.github.com/repos/Qabel/qabel-android/releases{/id}","deployments_url":"https://api.github.com/repos/Qabel/qabel-android/deployments","created_at":"2015-06-22T10:05:20Z","updated_at":"2016-05-19T12:24:16Z","pushed_at":"2016-06-06T11:32:22Z","git_url":"git://github.com/Qabel/qabel-android.git","ssh_url":"git@github.com:Qabel/qabel-android.git","clone_url":"https://github.com/Qabel/qabel-android.git","svn_url":"https://github.com/Qabel/qabel-android","homepage":"","size":7483,"stargazers_count":4,"watchers_count":4,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":75,"forks":13,"open_issues":75,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Qabel/qabel-android/pulls/542"},"html":{"href":"https://github.com/Qabel/qabel-android/pull/542"},"issue":{"href":"https://api.github.com/repos/Qabel/qabel-android/issues/542"},"comments":{"href":"https://api.github.com/repos/Qabel/qabel-android/issues/542/comments"},"review_comments":{"href":"https://api.github.com/repos/Qabel/qabel-android/pulls/542/comments"},"review_comment":{"href":"https://api.github.com/repos/Qabel/qabel-android/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Qabel/qabel-android/pulls/542/commits"},"statuses":{"href":"https://api.github.com/repos/Qabel/qabel-android/statuses/68087efd992f8bad5e10ab654fe9be4792dc789c"}}}}
{"actor":{"display_login":"JoGir"}}