{"action":"created","comment":{"url":"https://api.github.com/repos/Qabel/qabel-desktop/pulls/comments/51282046","id":51282046,"diff_hunk":"@@ -1,25 +1,64 @@\n package de.qabel.desktop.ui.actionlog;\n \n import de.qabel.core.config.Account;\n+import de.qabel.core.config.Contact;\n import de.qabel.core.config.Identity;\n-import de.qabel.core.crypto.QblECKeyPair;\n+import de.qabel.core.drop.DropMessage;\n+import de.qabel.core.drop.DropURL;\n+import de.qabel.core.exceptions.*;\n+import de.qabel.desktop.repository.exception.EntityNotFoundExcepion;\n+import de.qabel.desktop.repository.exception.PersistenceException;\n import de.qabel.desktop.ui.AbstractControllerTest;\n+import de.qabel.desktop.ui.connector.HttpDropConnector;\n+import org.junit.Before;\n import org.junit.Test;\n \n-import static org.junit.Assert.assertNotNull;\n+import java.net.URISyntaxException;\n+import java.util.ArrayList;\n+import java.util.Collection;\n+import java.util.Date;\n+import java.util.List;\n+\n+import static org.junit.Assert.assertEquals;\n+import static org.junit.Assert.assertNull;\n \n \n public class ActionlogControllerTest extends AbstractControllerTest {\n \n \tActionlogController controller;\n+\tIdentity i;\n+\tActionlogView view;\n+\tContact c;\n+\tString text = \"MessageString\";\n \n-\t@Test\n-\tpublic void injectTest() {\n-\t\tActionlogView view = new ActionlogView();\n-\t\tIdentity i = new Identity(\"test\", null, new QblECKeyPair());\n+\n+\n+\tprivate void createController(Identity i) {\n+\t\tview = new ActionlogView();\n \t\tclientConfiguration.selectIdentity(i);\n \t\tclientConfiguration.setAccount(new Account(\"Provider\", \"user\", \"auth\"));\n \t\tcontroller = (ActionlogController) view.getPresenter();\n-\t\tassertNotNull(controller);\n+\t}\n+\n+\t@Test\n+\tpublic void addMessageToActionlogTest() throws QblDropPayloadSizeException, PersistenceException, QblNetworkInvalidResponseException, EntityNotFoundExcepion {\n+\t\ti = identityBuilderFactory.factory().withAlias(\"TestAlias\").build();\n+\t\tc = new Contact(i, i.getAlias(), i.getDropUrls(), i.getEcPublicKey());\n+\t\tcreateController(i);\n+\t\tcontroller = (ActionlogController) view.getPresenter();\n+\t\tDropMessage dm = new DropMessage(i, text, \"dropMessage\");\n+\t\tcontroller.addMessageToActionlog(dm);\n+\t\tassertEquals(1, controller.messages.getChildren().size());\n+\t}\n+\n+\t@Test\n+\tpublic void addOwnMessageToActionlogTest() throws QblDropPayloadSizeException, PersistenceException, QblNetworkInvalidResponseException {\n+\t\ti = identityBuilderFactory.factory().withAlias(\"TestAlias\").build();\n+\t\tc = new Contact(i, i.getAlias(), i.getDropUrls(), i.getEcPublicKey());\n+\t\tcreateController(i);\n+\t\tcontroller = (ActionlogController) view.getPresenter();\n+\t\tDropMessage dm = new DropMessage(i, text, \"dropMessage\");\n+\t\tcontroller.addOwnMessageToActionlog(dm);\n+\t\tassertEquals(1, controller.messages.getChildren().size());","path":"src/test/java/de/qabel/desktop/ui/actionlog/ActionlogControllerTest.java","position":69,"original_position":69,"commit_id":"5bff5d468fe8c453ca7d917be7e4a71844e00b5d","original_commit_id":"5bff5d468fe8c453ca7d917be7e4a71844e00b5d","user":{"login":"julianseeger","id":3258762,"avatar_url":"https://avatars.githubusercontent.com/u/3258762?v=3","gravatar_id":"","url":"https://api.github.com/users/julianseeger","html_url":"https://github.com/julianseeger","followers_url":"https://api.github.com/users/julianseeger/followers","following_url":"https://api.github.com/users/julianseeger/following{/other_user}","gists_url":"https://api.github.com/users/julianseeger/gists{/gist_id}","starred_url":"https://api.github.com/users/julianseeger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julianseeger/subscriptions","organizations_url":"https://api.github.com/users/julianseeger/orgs","repos_url":"https://api.github.com/users/julianseeger/repos","events_url":"https://api.github.com/users/julianseeger/events{/privacy}","received_events_url":"https://api.github.com/users/julianseeger/received_events","type":"User","site_admin":false},"body":"looking at the tests, I see no difference between `controller.addOwnMessageToActionlog` and `controller.addMessageToActionlog`\r\n```JAVA\r\nvoid addOwnMessageToActionlog (DropMessage dm) { addMessageToActionlog(dm); }\r\n```\r\nseems to be a valid implementaion","created_at":"2016-01-29T16:34:06Z","updated_at":"2016-01-29T16:34:06Z","html_url":"https://github.com/Qabel/qabel-desktop/pull/110#discussion_r51282046","pull_request_url":"https://api.github.com/repos/Qabel/qabel-desktop/pulls/110","_links":{"self":{"href":"https://api.github.com/repos/Qabel/qabel-desktop/pulls/comments/51282046"},"html":{"href":"https://github.com/Qabel/qabel-desktop/pull/110#discussion_r51282046"},"pull_request":{"href":"https://api.github.com/repos/Qabel/qabel-desktop/pulls/110"}}},"pull_request":{"url":"https://api.github.com/repos/Qabel/qabel-desktop/pulls/110","id":57495164,"html_url":"https://github.com/Qabel/qabel-desktop/pull/110","diff_url":"https://github.com/Qabel/qabel-desktop/pull/110.diff","patch_url":"https://github.com/Qabel/qabel-desktop/pull/110.patch","issue_url":"https://api.github.com/repos/Qabel/qabel-desktop/issues/110","number":110,"state":"open","locked":false,"title":"Log","user":{"login":"jmt85","id":4853105,"avatar_url":"https://avatars.githubusercontent.com/u/4853105?v=3","gravatar_id":"","url":"https://api.github.com/users/jmt85","html_url":"https://github.com/jmt85","followers_url":"https://api.github.com/users/jmt85/followers","following_url":"https://api.github.com/users/jmt85/following{/other_user}","gists_url":"https://api.github.com/users/jmt85/gists{/gist_id}","starred_url":"https://api.github.com/users/jmt85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmt85/subscriptions","organizations_url":"https://api.github.com/users/jmt85/orgs","repos_url":"https://api.github.com/users/jmt85/repos","events_url":"https://api.github.com/users/jmt85/events{/privacy}","received_events_url":"https://api.github.com/users/jmt85/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-01-28T12:27:20Z","updated_at":"2016-01-29T16:34:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"578bd0fd09b8a6b9cf93d4c455a3a09910ab66eb","assignee":{"login":"jmt85","id":4853105,"avatar_url":"https://avatars.githubusercontent.com/u/4853105?v=3","gravatar_id":"","url":"https://api.github.com/users/jmt85","html_url":"https://github.com/jmt85","followers_url":"https://api.github.com/users/jmt85/followers","following_url":"https://api.github.com/users/jmt85/following{/other_user}","gists_url":"https://api.github.com/users/jmt85/gists{/gist_id}","starred_url":"https://api.github.com/users/jmt85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmt85/subscriptions","organizations_url":"https://api.github.com/users/jmt85/orgs","repos_url":"https://api.github.com/users/jmt85/repos","events_url":"https://api.github.com/users/jmt85/events{/privacy}","received_events_url":"https://api.github.com/users/jmt85/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/Qabel/qabel-desktop/milestones/21","html_url":"https://github.com/Qabel/qabel-desktop/milestones/Beta%201","labels_url":"https://api.github.com/repos/Qabel/qabel-desktop/milestones/21/labels","id":1497458,"number":21,"title":"Beta 1","description":"","creator":{"login":"jmt85","id":4853105,"avatar_url":"https://avatars.githubusercontent.com/u/4853105?v=3","gravatar_id":"","url":"https://api.github.com/users/jmt85","html_url":"https://github.com/jmt85","followers_url":"https://api.github.com/users/jmt85/followers","following_url":"https://api.github.com/users/jmt85/following{/other_user}","gists_url":"https://api.github.com/users/jmt85/gists{/gist_id}","starred_url":"https://api.github.com/users/jmt85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmt85/subscriptions","organizations_url":"https://api.github.com/users/jmt85/orgs","repos_url":"https://api.github.com/users/jmt85/repos","events_url":"https://api.github.com/users/jmt85/events{/privacy}","received_events_url":"https://api.github.com/users/jmt85/received_events","type":"User","site_admin":false},"open_issues":27,"closed_issues":29,"state":"open","created_at":"2016-01-11T14:55:23Z","updated_at":"2016-01-29T15:52:23Z","due_on":"2016-02-11T23:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/Qabel/qabel-desktop/pulls/110/commits","review_comments_url":"https://api.github.com/repos/Qabel/qabel-desktop/pulls/110/comments","review_comment_url":"https://api.github.com/repos/Qabel/qabel-desktop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Qabel/qabel-desktop/issues/110/comments","statuses_url":"https://api.github.com/repos/Qabel/qabel-desktop/statuses/5bff5d468fe8c453ca7d917be7e4a71844e00b5d","head":{"label":"jmt85:log","ref":"log","sha":"5bff5d468fe8c453ca7d917be7e4a71844e00b5d","user":{"login":"jmt85","id":4853105,"avatar_url":"https://avatars.githubusercontent.com/u/4853105?v=3","gravatar_id":"","url":"https://api.github.com/users/jmt85","html_url":"https://github.com/jmt85","followers_url":"https://api.github.com/users/jmt85/followers","following_url":"https://api.github.com/users/jmt85/following{/other_user}","gists_url":"https://api.github.com/users/jmt85/gists{/gist_id}","starred_url":"https://api.github.com/users/jmt85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmt85/subscriptions","organizations_url":"https://api.github.com/users/jmt85/orgs","repos_url":"https://api.github.com/users/jmt85/repos","events_url":"https://api.github.com/users/jmt85/events{/privacy}","received_events_url":"https://api.github.com/users/jmt85/received_events","type":"User","site_admin":false},"repo":{"id":48989612,"name":"qabel-desktop","full_name":"jmt85/qabel-desktop","owner":{"login":"jmt85","id":4853105,"avatar_url":"https://avatars.githubusercontent.com/u/4853105?v=3","gravatar_id":"","url":"https://api.github.com/users/jmt85","html_url":"https://github.com/jmt85","followers_url":"https://api.github.com/users/jmt85/followers","following_url":"https://api.github.com/users/jmt85/following{/other_user}","gists_url":"https://api.github.com/users/jmt85/gists{/gist_id}","starred_url":"https://api.github.com/users/jmt85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmt85/subscriptions","organizations_url":"https://api.github.com/users/jmt85/orgs","repos_url":"https://api.github.com/users/jmt85/repos","events_url":"https://api.github.com/users/jmt85/events{/privacy}","received_events_url":"https://api.github.com/users/jmt85/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jmt85/qabel-desktop","description":"Desktop Frontend of Qabel","fork":true,"url":"https://api.github.com/repos/jmt85/qabel-desktop","forks_url":"https://api.github.com/repos/jmt85/qabel-desktop/forks","keys_url":"https://api.github.com/repos/jmt85/qabel-desktop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jmt85/qabel-desktop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jmt85/qabel-desktop/teams","hooks_url":"https://api.github.com/repos/jmt85/qabel-desktop/hooks","issue_events_url":"https://api.github.com/repos/jmt85/qabel-desktop/issues/events{/number}","events_url":"https://api.github.com/repos/jmt85/qabel-desktop/events","assignees_url":"https://api.github.com/repos/jmt85/qabel-desktop/assignees{/user}","branches_url":"https://api.github.com/repos/jmt85/qabel-desktop/branches{/branch}","tags_url":"https://api.github.com/repos/jmt85/qabel-desktop/tags","blobs_url":"https://api.github.com/repos/jmt85/qabel-desktop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jmt85/qabel-desktop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jmt85/qabel-desktop/git/refs{/sha}","trees_url":"https://api.github.com/repos/jmt85/qabel-desktop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jmt85/qabel-desktop/statuses/{sha}","languages_url":"https://api.github.com/repos/jmt85/qabel-desktop/languages","stargazers_url":"https://api.github.com/repos/jmt85/qabel-desktop/stargazers","contributors_url":"https://api.github.com/repos/jmt85/qabel-desktop/contributors","subscribers_url":"https://api.github.com/repos/jmt85/qabel-desktop/subscribers","subscription_url":"https://api.github.com/repos/jmt85/qabel-desktop/subscription","commits_url":"https://api.github.com/repos/jmt85/qabel-desktop/commits{/sha}","git_commits_url":"https://api.github.com/repos/jmt85/qabel-desktop/git/commits{/sha}","comments_url":"https://api.github.com/repos/jmt85/qabel-desktop/comments{/number}","issue_comment_url":"https://api.github.com/repos/jmt85/qabel-desktop/issues/comments{/number}","contents_url":"https://api.github.com/repos/jmt85/qabel-desktop/contents/{+path}","compare_url":"https://api.github.com/repos/jmt85/qabel-desktop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jmt85/qabel-desktop/merges","archive_url":"https://api.github.com/repos/jmt85/qabel-desktop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jmt85/qabel-desktop/downloads","issues_url":"https://api.github.com/repos/jmt85/qabel-desktop/issues{/number}","pulls_url":"https://api.github.com/repos/jmt85/qabel-desktop/pulls{/number}","milestones_url":"https://api.github.com/repos/jmt85/qabel-desktop/milestones{/number}","notifications_url":"https://api.github.com/repos/jmt85/qabel-desktop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jmt85/qabel-desktop/labels{/name}","releases_url":"https://api.github.com/repos/jmt85/qabel-desktop/releases{/id}","deployments_url":"https://api.github.com/repos/jmt85/qabel-desktop/deployments","created_at":"2016-01-04T10:15:18Z","updated_at":"2016-01-15T13:54:01Z","pushed_at":"2016-01-29T15:54:34Z","git_url":"git://github.com/jmt85/qabel-desktop.git","ssh_url":"git@github.com:jmt85/qabel-desktop.git","clone_url":"https://github.com/jmt85/qabel-desktop.git","svn_url":"https://github.com/jmt85/qabel-desktop","homepage":null,"size":1373,"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":"87f24198fdb8e35d4f1a91d5852a6fecd88e5538","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":25461792,"name":"qabel-desktop","full_name":"Qabel/qabel-desktop","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-desktop","description":"Desktop Frontend of Qabel","fork":false,"url":"https://api.github.com/repos/Qabel/qabel-desktop","forks_url":"https://api.github.com/repos/Qabel/qabel-desktop/forks","keys_url":"https://api.github.com/repos/Qabel/qabel-desktop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Qabel/qabel-desktop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Qabel/qabel-desktop/teams","hooks_url":"https://api.github.com/repos/Qabel/qabel-desktop/hooks","issue_events_url":"https://api.github.com/repos/Qabel/qabel-desktop/issues/events{/number}","events_url":"https://api.github.com/repos/Qabel/qabel-desktop/events","assignees_url":"https://api.github.com/repos/Qabel/qabel-desktop/assignees{/user}","branches_url":"https://api.github.com/repos/Qabel/qabel-desktop/branches{/branch}","tags_url":"https://api.github.com/repos/Qabel/qabel-desktop/tags","blobs_url":"https://api.github.com/repos/Qabel/qabel-desktop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Qabel/qabel-desktop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Qabel/qabel-desktop/git/refs{/sha}","trees_url":"https://api.github.com/repos/Qabel/qabel-desktop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Qabel/qabel-desktop/statuses/{sha}","languages_url":"https://api.github.com/repos/Qabel/qabel-desktop/languages","stargazers_url":"https://api.github.com/repos/Qabel/qabel-desktop/stargazers","contributors_url":"https://api.github.com/repos/Qabel/qabel-desktop/contributors","subscribers_url":"https://api.github.com/repos/Qabel/qabel-desktop/subscribers","subscription_url":"https://api.github.com/repos/Qabel/qabel-desktop/subscription","commits_url":"https://api.github.com/repos/Qabel/qabel-desktop/commits{/sha}","git_commits_url":"https://api.github.com/repos/Qabel/qabel-desktop/git/commits{/sha}","comments_url":"https://api.github.com/repos/Qabel/qabel-desktop/comments{/number}","issue_comment_url":"https://api.github.com/repos/Qabel/qabel-desktop/issues/comments{/number}","contents_url":"https://api.github.com/repos/Qabel/qabel-desktop/contents/{+path}","compare_url":"https://api.github.com/repos/Qabel/qabel-desktop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Qabel/qabel-desktop/merges","archive_url":"https://api.github.com/repos/Qabel/qabel-desktop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Qabel/qabel-desktop/downloads","issues_url":"https://api.github.com/repos/Qabel/qabel-desktop/issues{/number}","pulls_url":"https://api.github.com/repos/Qabel/qabel-desktop/pulls{/number}","milestones_url":"https://api.github.com/repos/Qabel/qabel-desktop/milestones{/number}","notifications_url":"https://api.github.com/repos/Qabel/qabel-desktop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Qabel/qabel-desktop/labels{/name}","releases_url":"https://api.github.com/repos/Qabel/qabel-desktop/releases{/id}","deployments_url":"https://api.github.com/repos/Qabel/qabel-desktop/deployments","created_at":"2014-10-20T10:38:47Z","updated_at":"2016-01-11T11:57:38Z","pushed_at":"2016-01-29T15:54:34Z","git_url":"git://github.com/Qabel/qabel-desktop.git","ssh_url":"git@github.com:Qabel/qabel-desktop.git","clone_url":"https://github.com/Qabel/qabel-desktop.git","svn_url":"https://github.com/Qabel/qabel-desktop","homepage":null,"size":1333,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":29,"forks":9,"open_issues":29,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Qabel/qabel-desktop/pulls/110"},"html":{"href":"https://github.com/Qabel/qabel-desktop/pull/110"},"issue":{"href":"https://api.github.com/repos/Qabel/qabel-desktop/issues/110"},"comments":{"href":"https://api.github.com/repos/Qabel/qabel-desktop/issues/110/comments"},"review_comments":{"href":"https://api.github.com/repos/Qabel/qabel-desktop/pulls/110/comments"},"review_comment":{"href":"https://api.github.com/repos/Qabel/qabel-desktop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Qabel/qabel-desktop/pulls/110/commits"},"statuses":{"href":"https://api.github.com/repos/Qabel/qabel-desktop/statuses/5bff5d468fe8c453ca7d917be7e4a71844e00b5d"}}}}