{"action":"created","comment":{"url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/pulls/comments/27517113","id":27517113,"diff_hunk":"@@ -0,0 +1,106 @@\n+/*\n+ Copyright 2014 Red Hat, Inc. and/or its affiliates.\n+\n+ This file is part of darcy-webdriver.\n+\n+ This program is free software: you can redistribute it and/or modify\n+ it under the terms of the GNU General Public License as published by\n+ the Free Software Foundation, either version 3 of the License, or\n+ (at your option) any later version.\n+\n+ This program is distributed in the hope that it will be useful,\n+ but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+ GNU General Public License for more details.\n+\n+ You should have received a copy of the GNU General Public License\n+ along with this program.  If not, see <http://www.gnu.org/licenses/>.\n+ */\n+\n+package com.redhat.darcy.webdriver;\n+\n+import static org.mockito.Mockito.mock;\n+import static org.mockito.Mockito.verify;\n+import static org.mockito.Mockito.when;\n+\n+import com.redhat.darcy.web.Cookie;\n+import com.redhat.darcy.webdriver.internal.TargetedWebDriver;\n+import com.redhat.darcy.webdriver.internal.WebDriverCookieManager;\n+\n+import org.junit.Test;\n+import org.junit.runner.RunWith;\n+import org.junit.runners.Parameterized;\n+import org.junit.runners.Parameterized.Parameters;\n+import org.junit.runners.Parameterized.Parameter;\n+import org.openqa.selenium.WebDriver;\n+\n+import java.time.LocalDateTime;\n+import java.util.Arrays;\n+import java.util.Collection;\n+\n+@RunWith(Parameterized.class)\n+public class WebDriverCookieManagerAddGetDeleteCookieTest {\n+\n+    private static final Object[][] parameterizedChars = {\n+            {new Cookie(\"chocolate\", \"chip\")},\n+            {new Cookie(\"chocolate\", \"chip\", \"\")},\n+            {new Cookie(\"chocolate\", \"chip\", \"\", LocalDateTime.now().plusDays(1))},\n+            {new Cookie(\"chocolate\", \"chip\", \"\", null)},\n+            {new Cookie(\"chocolate\", \"chip\", null, \"\", LocalDateTime.now().plusDays(1))},\n+            {new Cookie(\"chocolate\", \"chip\", null, \"\", null, false)},\n+            {new Cookie(\"chocolate\", \"chip\", null, \"\", null, false, false)},\n+    };\n+\n+    @Parameter\n+    public Cookie cookie;\n+\n+    @Parameters\n+    public static Collection<Object[]> data() {\n+        return Arrays.asList(parameterizedChars);\n+    }\n+\n+    @Test\n+    public void shouldAddCookie() {\n+        TargetedWebDriver mockDriver = mock(TargetedWebDriver.class);\n+        WebDriver.Options mockOptions = mock(WebDriver.Options.class);\n+\n+        when(mockDriver.manage())\n+                .thenReturn(mockOptions);\n+\n+        WebDriverCookieManager cookieManager = new WebDriverCookieManager(mockDriver);\n+        cookieManager.add(cookie);\n+\n+        verify(mockOptions)\n+                .addCookie(new org.openqa.selenium.Cookie(cookie.getName(), cookie.getValue()));\n+    }\n+\n+    @Test\n+    public void shouldGetCookie() {","path":"src/test/java/com/redhat/darcy/webdriver/WebDriverCookieManagerAddGetDeleteCookieTest.java","position":null,"original_position":78,"commit_id":"78174f154c3755a0c6a598806e053587044255e3","original_commit_id":"c79b829587e77aa181bae41683eed27ab4b1fd81","user":{"login":"abocz","id":1452700,"avatar_url":"https://avatars.githubusercontent.com/u/1452700?v=3","gravatar_id":"","url":"https://api.github.com/users/abocz","html_url":"https://github.com/abocz","followers_url":"https://api.github.com/users/abocz/followers","following_url":"https://api.github.com/users/abocz/following{/other_user}","gists_url":"https://api.github.com/users/abocz/gists{/gist_id}","starred_url":"https://api.github.com/users/abocz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abocz/subscriptions","organizations_url":"https://api.github.com/users/abocz/orgs","repos_url":"https://api.github.com/users/abocz/repos","events_url":"https://api.github.com/users/abocz/events{/privacy}","received_events_url":"https://api.github.com/users/abocz/received_events","type":"User","site_admin":false},"body":"I think I got it covered.\r\n\r\nThanks for linking that. The line by line analysis is very cool.","created_at":"2015-03-31T20:02:18Z","updated_at":"2015-03-31T20:02:18Z","html_url":"https://github.com/darcy-framework/darcy-webdriver/pull/47#discussion_r27517113","pull_request_url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/pulls/47","_links":{"self":{"href":"https://api.github.com/repos/darcy-framework/darcy-webdriver/pulls/comments/27517113"},"html":{"href":"https://github.com/darcy-framework/darcy-webdriver/pull/47#discussion_r27517113"},"pull_request":{"href":"https://api.github.com/repos/darcy-framework/darcy-webdriver/pulls/47"}}},"pull_request":{"url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/pulls/47","id":30505114,"html_url":"https://github.com/darcy-framework/darcy-webdriver/pull/47","diff_url":"https://github.com/darcy-framework/darcy-webdriver/pull/47.diff","patch_url":"https://github.com/darcy-framework/darcy-webdriver/pull/47.patch","issue_url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/issues/47","number":47,"state":"open","locked":false,"title":"Add cookie api impl","user":{"login":"abocz","id":1452700,"avatar_url":"https://avatars.githubusercontent.com/u/1452700?v=3","gravatar_id":"","url":"https://api.github.com/users/abocz","html_url":"https://github.com/abocz","followers_url":"https://api.github.com/users/abocz/followers","following_url":"https://api.github.com/users/abocz/following{/other_user}","gists_url":"https://api.github.com/users/abocz/gists{/gist_id}","starred_url":"https://api.github.com/users/abocz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abocz/subscriptions","organizations_url":"https://api.github.com/users/abocz/orgs","repos_url":"https://api.github.com/users/abocz/repos","events_url":"https://api.github.com/users/abocz/events{/privacy}","received_events_url":"https://api.github.com/users/abocz/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-04T21:15:34Z","updated_at":"2015-03-31T20:02:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0bcef798ae46e81d0f5f27b53864ed6d44246f5f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/pulls/47/commits","review_comments_url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/pulls/47/comments","review_comment_url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/pulls/comments{/number}","comments_url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/issues/47/comments","statuses_url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/statuses/78174f154c3755a0c6a598806e053587044255e3","head":{"label":"abocz:add-cookie-api-impl","ref":"add-cookie-api-impl","sha":"78174f154c3755a0c6a598806e053587044255e3","user":{"login":"abocz","id":1452700,"avatar_url":"https://avatars.githubusercontent.com/u/1452700?v=3","gravatar_id":"","url":"https://api.github.com/users/abocz","html_url":"https://github.com/abocz","followers_url":"https://api.github.com/users/abocz/followers","following_url":"https://api.github.com/users/abocz/following{/other_user}","gists_url":"https://api.github.com/users/abocz/gists{/gist_id}","starred_url":"https://api.github.com/users/abocz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abocz/subscriptions","organizations_url":"https://api.github.com/users/abocz/orgs","repos_url":"https://api.github.com/users/abocz/repos","events_url":"https://api.github.com/users/abocz/events{/privacy}","received_events_url":"https://api.github.com/users/abocz/received_events","type":"User","site_admin":false},"repo":{"id":26151481,"name":"darcy-webdriver","full_name":"abocz/darcy-webdriver","owner":{"login":"abocz","id":1452700,"avatar_url":"https://avatars.githubusercontent.com/u/1452700?v=3","gravatar_id":"","url":"https://api.github.com/users/abocz","html_url":"https://github.com/abocz","followers_url":"https://api.github.com/users/abocz/followers","following_url":"https://api.github.com/users/abocz/following{/other_user}","gists_url":"https://api.github.com/users/abocz/gists{/gist_id}","starred_url":"https://api.github.com/users/abocz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abocz/subscriptions","organizations_url":"https://api.github.com/users/abocz/orgs","repos_url":"https://api.github.com/users/abocz/repos","events_url":"https://api.github.com/users/abocz/events{/privacy}","received_events_url":"https://api.github.com/users/abocz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/abocz/darcy-webdriver","description":"An implementation of darcy-web that uses Selenium WebDriver as the automation library backend.","fork":true,"url":"https://api.github.com/repos/abocz/darcy-webdriver","forks_url":"https://api.github.com/repos/abocz/darcy-webdriver/forks","keys_url":"https://api.github.com/repos/abocz/darcy-webdriver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/abocz/darcy-webdriver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/abocz/darcy-webdriver/teams","hooks_url":"https://api.github.com/repos/abocz/darcy-webdriver/hooks","issue_events_url":"https://api.github.com/repos/abocz/darcy-webdriver/issues/events{/number}","events_url":"https://api.github.com/repos/abocz/darcy-webdriver/events","assignees_url":"https://api.github.com/repos/abocz/darcy-webdriver/assignees{/user}","branches_url":"https://api.github.com/repos/abocz/darcy-webdriver/branches{/branch}","tags_url":"https://api.github.com/repos/abocz/darcy-webdriver/tags","blobs_url":"https://api.github.com/repos/abocz/darcy-webdriver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/abocz/darcy-webdriver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/abocz/darcy-webdriver/git/refs{/sha}","trees_url":"https://api.github.com/repos/abocz/darcy-webdriver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/abocz/darcy-webdriver/statuses/{sha}","languages_url":"https://api.github.com/repos/abocz/darcy-webdriver/languages","stargazers_url":"https://api.github.com/repos/abocz/darcy-webdriver/stargazers","contributors_url":"https://api.github.com/repos/abocz/darcy-webdriver/contributors","subscribers_url":"https://api.github.com/repos/abocz/darcy-webdriver/subscribers","subscription_url":"https://api.github.com/repos/abocz/darcy-webdriver/subscription","commits_url":"https://api.github.com/repos/abocz/darcy-webdriver/commits{/sha}","git_commits_url":"https://api.github.com/repos/abocz/darcy-webdriver/git/commits{/sha}","comments_url":"https://api.github.com/repos/abocz/darcy-webdriver/comments{/number}","issue_comment_url":"https://api.github.com/repos/abocz/darcy-webdriver/issues/comments{/number}","contents_url":"https://api.github.com/repos/abocz/darcy-webdriver/contents/{+path}","compare_url":"https://api.github.com/repos/abocz/darcy-webdriver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/abocz/darcy-webdriver/merges","archive_url":"https://api.github.com/repos/abocz/darcy-webdriver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/abocz/darcy-webdriver/downloads","issues_url":"https://api.github.com/repos/abocz/darcy-webdriver/issues{/number}","pulls_url":"https://api.github.com/repos/abocz/darcy-webdriver/pulls{/number}","milestones_url":"https://api.github.com/repos/abocz/darcy-webdriver/milestones{/number}","notifications_url":"https://api.github.com/repos/abocz/darcy-webdriver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/abocz/darcy-webdriver/labels{/name}","releases_url":"https://api.github.com/repos/abocz/darcy-webdriver/releases{/id}","created_at":"2014-11-04T03:41:46Z","updated_at":"2015-01-21T03:47:26Z","pushed_at":"2015-03-31T19:39:11Z","git_url":"git://github.com/abocz/darcy-webdriver.git","ssh_url":"git@github.com:abocz/darcy-webdriver.git","clone_url":"https://github.com/abocz/darcy-webdriver.git","svn_url":"https://github.com/abocz/darcy-webdriver","homepage":"","size":678,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"darcy-framework:master","ref":"master","sha":"4327c58c21ceeee70a05eef65ad7ea30f9964ca9","user":{"login":"darcy-framework","id":7107495,"avatar_url":"https://avatars.githubusercontent.com/u/7107495?v=3","gravatar_id":"","url":"https://api.github.com/users/darcy-framework","html_url":"https://github.com/darcy-framework","followers_url":"https://api.github.com/users/darcy-framework/followers","following_url":"https://api.github.com/users/darcy-framework/following{/other_user}","gists_url":"https://api.github.com/users/darcy-framework/gists{/gist_id}","starred_url":"https://api.github.com/users/darcy-framework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darcy-framework/subscriptions","organizations_url":"https://api.github.com/users/darcy-framework/orgs","repos_url":"https://api.github.com/users/darcy-framework/repos","events_url":"https://api.github.com/users/darcy-framework/events{/privacy}","received_events_url":"https://api.github.com/users/darcy-framework/received_events","type":"Organization","site_admin":false},"repo":{"id":18268807,"name":"darcy-webdriver","full_name":"darcy-framework/darcy-webdriver","owner":{"login":"darcy-framework","id":7107495,"avatar_url":"https://avatars.githubusercontent.com/u/7107495?v=3","gravatar_id":"","url":"https://api.github.com/users/darcy-framework","html_url":"https://github.com/darcy-framework","followers_url":"https://api.github.com/users/darcy-framework/followers","following_url":"https://api.github.com/users/darcy-framework/following{/other_user}","gists_url":"https://api.github.com/users/darcy-framework/gists{/gist_id}","starred_url":"https://api.github.com/users/darcy-framework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darcy-framework/subscriptions","organizations_url":"https://api.github.com/users/darcy-framework/orgs","repos_url":"https://api.github.com/users/darcy-framework/repos","events_url":"https://api.github.com/users/darcy-framework/events{/privacy}","received_events_url":"https://api.github.com/users/darcy-framework/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/darcy-framework/darcy-webdriver","description":"An implementation of darcy-web that uses Selenium WebDriver as the automation library backend.","fork":false,"url":"https://api.github.com/repos/darcy-framework/darcy-webdriver","forks_url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/forks","keys_url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/teams","hooks_url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/hooks","issue_events_url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/issues/events{/number}","events_url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/events","assignees_url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/assignees{/user}","branches_url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/branches{/branch}","tags_url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/tags","blobs_url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/git/refs{/sha}","trees_url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/statuses/{sha}","languages_url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/languages","stargazers_url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/stargazers","contributors_url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/contributors","subscribers_url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/subscribers","subscription_url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/subscription","commits_url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/commits{/sha}","git_commits_url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/git/commits{/sha}","comments_url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/comments{/number}","issue_comment_url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/issues/comments{/number}","contents_url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/contents/{+path}","compare_url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/merges","archive_url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/downloads","issues_url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/issues{/number}","pulls_url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/pulls{/number}","milestones_url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/milestones{/number}","notifications_url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/labels{/name}","releases_url":"https://api.github.com/repos/darcy-framework/darcy-webdriver/releases{/id}","created_at":"2014-03-30T17:02:40Z","updated_at":"2015-03-31T19:39:58Z","pushed_at":"2015-03-31T19:39:58Z","git_url":"git://github.com/darcy-framework/darcy-webdriver.git","ssh_url":"git@github.com:darcy-framework/darcy-webdriver.git","clone_url":"https://github.com/darcy-framework/darcy-webdriver.git","svn_url":"https://github.com/darcy-framework/darcy-webdriver","homepage":"","size":1377,"stargazers_count":4,"watchers_count":4,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":9,"forks":10,"open_issues":9,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/darcy-framework/darcy-webdriver/pulls/47"},"html":{"href":"https://github.com/darcy-framework/darcy-webdriver/pull/47"},"issue":{"href":"https://api.github.com/repos/darcy-framework/darcy-webdriver/issues/47"},"comments":{"href":"https://api.github.com/repos/darcy-framework/darcy-webdriver/issues/47/comments"},"review_comments":{"href":"https://api.github.com/repos/darcy-framework/darcy-webdriver/pulls/47/comments"},"review_comment":{"href":"https://api.github.com/repos/darcy-framework/darcy-webdriver/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/darcy-framework/darcy-webdriver/pulls/47/commits"},"statuses":{"href":"https://api.github.com/repos/darcy-framework/darcy-webdriver/statuses/78174f154c3755a0c6a598806e053587044255e3"}}}}