{"action":"created","comment":{"url":"https://api.github.com/repos/TygerBurning/Pandemic/pulls/comments/77063519","id":77063519,"diff_hunk":"@@ -0,0 +1,90 @@\n+/*\n+ * To change this license header, choose License Headers in Project Properties.\n+ * To change this template file, choose Tools | Templates\n+ * and open the template in the editor.\n+ */\n+package org.pandemic.game.operations.actions;\n+\n+import java.util.ArrayList;\n+import java.util.List;\n+import org.json.JSONObject;\n+import org.junit.After;\n+import org.junit.AfterClass;\n+import org.junit.Before;\n+import org.junit.BeforeClass;\n+import org.junit.Test;\n+import static org.junit.Assert.*;\n+import static org.mockito.Mockito.*;\n+import org.pandemic.game.BoardState;\n+import org.pandemic.game.City;\n+import org.pandemic.game.Deck;\n+import org.pandemic.game.Disease;\n+import org.pandemic.game.Player;\n+import org.pandemic.game.cards.PlayerCard;\n+import org.pandemic.game.cards.PlayerCityCard;\n+import org.pandemic.global.BoardStateAccess;\n+\n+/**\n+ *\n+ * @author Steve\n+ */\n+public class ActionCureTest {\n+    \n+    public ActionCureTest() {\n+    }\n+    \n+    private static Deck<PlayerCard> discardPile;\n+    private static List<City> researchStations;\n+    private static City city;\n+    private static PlayerCityCard cityCard;\n+    \n+    @BeforeClass\n+    public static void setUpClass() {\n+        BoardState boardState = mock(BoardState.class);\n+        BoardStateAccess.setBoardState(boardState);\n+        discardPile = new Deck<>();\n+        researchStations = new ArrayList<>();\n+        when(boardState.getPlayerDiscard()).thenReturn(discardPile);\n+        when(boardState.getResearchStations()).thenReturn(researchStations);\n+        \n+        Player player = new Player();\n+        Disease disease = new Disease(\"DiseaseName\", \"000000\", 0);\n+        city = new City(0, \"testCity\", 0, 0, 0, disease);\n+        cityCard = new PlayerCityCard(city);\n+        player.addCard(cityCard);\n+        PlayerCityCard card = new PlayerCityCard(city);\n+        ActionBuildResearch action = new ActionBuildResearch(player, card);\n+        action.execute();\n+    }\n+    \n+    @AfterClass\n+    public static void tearDownClass() {\n+    }\n+    \n+    @Before\n+    public void setUp() {\n+    }\n+    \n+    @After\n+    public void tearDown() {\n+    }\n+\n+    @Test\n+    public void onExecutionResearchStationAddedToCurrentCity(){\n+        boolean found = false;\n+        for(City researchCity : researchStations){\n+            if(researchCity.equals(city)){\n+                found = true;\n+            }\n+        }\n+        assertTrue(found);\n+    }\n+    \n+    @Test\n+    public void onExecutionCityCardDiscarded(){\n+        PlayerCard drawnCard = discardPile.drawFromTop();\n+        assertTrue(drawnCard instanceof PlayerCityCard);\n+        assertEquals(((PlayerCityCard) drawnCard).getCity(),cityCard.getCity());\n+    }\n+    ","path":"src/test/java/org/pandemic/game/operations/actions/ActionCureTest.java","position":89,"original_position":89,"commit_id":"27477e08948e3a2e06364be40ceef3c54ca0173c","original_commit_id":"27477e08948e3a2e06364be40ceef3c54ca0173c","user":{"login":"TygerBurning","id":6792948,"avatar_url":"https://avatars.githubusercontent.com/u/6792948?v=3","gravatar_id":"","url":"https://api.github.com/users/TygerBurning","html_url":"https://github.com/TygerBurning","followers_url":"https://api.github.com/users/TygerBurning/followers","following_url":"https://api.github.com/users/TygerBurning/following{/other_user}","gists_url":"https://api.github.com/users/TygerBurning/gists{/gist_id}","starred_url":"https://api.github.com/users/TygerBurning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TygerBurning/subscriptions","organizations_url":"https://api.github.com/users/TygerBurning/orgs","repos_url":"https://api.github.com/users/TygerBurning/repos","events_url":"https://api.github.com/users/TygerBurning/events{/privacy}","received_events_url":"https://api.github.com/users/TygerBurning/received_events","type":"User","site_admin":false},"body":"Should probably also check the `undo()` method, as this is more invisible part!","created_at":"2016-08-31T20:10:32Z","updated_at":"2016-08-31T20:10:32Z","html_url":"https://github.com/TygerBurning/Pandemic/pull/74#discussion_r77063519","pull_request_url":"https://api.github.com/repos/TygerBurning/Pandemic/pulls/74","_links":{"self":{"href":"https://api.github.com/repos/TygerBurning/Pandemic/pulls/comments/77063519"},"html":{"href":"https://github.com/TygerBurning/Pandemic/pull/74#discussion_r77063519"},"pull_request":{"href":"https://api.github.com/repos/TygerBurning/Pandemic/pulls/74"}}},"pull_request":{"url":"https://api.github.com/repos/TygerBurning/Pandemic/pulls/74","id":83482044,"html_url":"https://github.com/TygerBurning/Pandemic/pull/74","diff_url":"https://github.com/TygerBurning/Pandemic/pull/74.diff","patch_url":"https://github.com/TygerBurning/Pandemic/pull/74.patch","issue_url":"https://api.github.com/repos/TygerBurning/Pandemic/issues/74","number":74,"state":"open","locked":false,"title":"Sto30 - Tests :)","user":{"login":"stephenheap","id":6747410,"avatar_url":"https://avatars.githubusercontent.com/u/6747410?v=3","gravatar_id":"","url":"https://api.github.com/users/stephenheap","html_url":"https://github.com/stephenheap","followers_url":"https://api.github.com/users/stephenheap/followers","following_url":"https://api.github.com/users/stephenheap/following{/other_user}","gists_url":"https://api.github.com/users/stephenheap/gists{/gist_id}","starred_url":"https://api.github.com/users/stephenheap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephenheap/subscriptions","organizations_url":"https://api.github.com/users/stephenheap/orgs","repos_url":"https://api.github.com/users/stephenheap/repos","events_url":"https://api.github.com/users/stephenheap/events{/privacy}","received_events_url":"https://api.github.com/users/stephenheap/received_events","type":"User","site_admin":false},"body":"We have tests! (well some at least)\r\n\r\nSeen as how I have no internet except at Costa, I thought I'd PR this for you to have a look at, mainly so I don't write lots of tests, and we decide to do them differently / in a different format later.\r\n\r\nI think there's a couple of fixes in here too, that I noticed while writing the tests.","created_at":"2016-08-31T16:05:53Z","updated_at":"2016-08-31T20:10:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a2ee1eebf44aef3bc81251e590fe1daf4e6ddb86","assignee":{"login":"TygerBurning","id":6792948,"avatar_url":"https://avatars.githubusercontent.com/u/6792948?v=3","gravatar_id":"","url":"https://api.github.com/users/TygerBurning","html_url":"https://github.com/TygerBurning","followers_url":"https://api.github.com/users/TygerBurning/followers","following_url":"https://api.github.com/users/TygerBurning/following{/other_user}","gists_url":"https://api.github.com/users/TygerBurning/gists{/gist_id}","starred_url":"https://api.github.com/users/TygerBurning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TygerBurning/subscriptions","organizations_url":"https://api.github.com/users/TygerBurning/orgs","repos_url":"https://api.github.com/users/TygerBurning/repos","events_url":"https://api.github.com/users/TygerBurning/events{/privacy}","received_events_url":"https://api.github.com/users/TygerBurning/received_events","type":"User","site_admin":false},"assignees":[{"login":"TygerBurning","id":6792948,"avatar_url":"https://avatars.githubusercontent.com/u/6792948?v=3","gravatar_id":"","url":"https://api.github.com/users/TygerBurning","html_url":"https://github.com/TygerBurning","followers_url":"https://api.github.com/users/TygerBurning/followers","following_url":"https://api.github.com/users/TygerBurning/following{/other_user}","gists_url":"https://api.github.com/users/TygerBurning/gists{/gist_id}","starred_url":"https://api.github.com/users/TygerBurning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TygerBurning/subscriptions","organizations_url":"https://api.github.com/users/TygerBurning/orgs","repos_url":"https://api.github.com/users/TygerBurning/repos","events_url":"https://api.github.com/users/TygerBurning/events{/privacy}","received_events_url":"https://api.github.com/users/TygerBurning/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/TygerBurning/Pandemic/pulls/74/commits","review_comments_url":"https://api.github.com/repos/TygerBurning/Pandemic/pulls/74/comments","review_comment_url":"https://api.github.com/repos/TygerBurning/Pandemic/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TygerBurning/Pandemic/issues/74/comments","statuses_url":"https://api.github.com/repos/TygerBurning/Pandemic/statuses/27477e08948e3a2e06364be40ceef3c54ca0173c","head":{"label":"TygerBurning:sto30","ref":"sto30","sha":"27477e08948e3a2e06364be40ceef3c54ca0173c","user":{"login":"TygerBurning","id":6792948,"avatar_url":"https://avatars.githubusercontent.com/u/6792948?v=3","gravatar_id":"","url":"https://api.github.com/users/TygerBurning","html_url":"https://github.com/TygerBurning","followers_url":"https://api.github.com/users/TygerBurning/followers","following_url":"https://api.github.com/users/TygerBurning/following{/other_user}","gists_url":"https://api.github.com/users/TygerBurning/gists{/gist_id}","starred_url":"https://api.github.com/users/TygerBurning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TygerBurning/subscriptions","organizations_url":"https://api.github.com/users/TygerBurning/orgs","repos_url":"https://api.github.com/users/TygerBurning/repos","events_url":"https://api.github.com/users/TygerBurning/events{/privacy}","received_events_url":"https://api.github.com/users/TygerBurning/received_events","type":"User","site_admin":false},"repo":{"id":53813998,"name":"Pandemic","full_name":"TygerBurning/Pandemic","owner":{"login":"TygerBurning","id":6792948,"avatar_url":"https://avatars.githubusercontent.com/u/6792948?v=3","gravatar_id":"","url":"https://api.github.com/users/TygerBurning","html_url":"https://github.com/TygerBurning","followers_url":"https://api.github.com/users/TygerBurning/followers","following_url":"https://api.github.com/users/TygerBurning/following{/other_user}","gists_url":"https://api.github.com/users/TygerBurning/gists{/gist_id}","starred_url":"https://api.github.com/users/TygerBurning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TygerBurning/subscriptions","organizations_url":"https://api.github.com/users/TygerBurning/orgs","repos_url":"https://api.github.com/users/TygerBurning/repos","events_url":"https://api.github.com/users/TygerBurning/events{/privacy}","received_events_url":"https://api.github.com/users/TygerBurning/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/TygerBurning/Pandemic","description":"","fork":false,"url":"https://api.github.com/repos/TygerBurning/Pandemic","forks_url":"https://api.github.com/repos/TygerBurning/Pandemic/forks","keys_url":"https://api.github.com/repos/TygerBurning/Pandemic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TygerBurning/Pandemic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TygerBurning/Pandemic/teams","hooks_url":"https://api.github.com/repos/TygerBurning/Pandemic/hooks","issue_events_url":"https://api.github.com/repos/TygerBurning/Pandemic/issues/events{/number}","events_url":"https://api.github.com/repos/TygerBurning/Pandemic/events","assignees_url":"https://api.github.com/repos/TygerBurning/Pandemic/assignees{/user}","branches_url":"https://api.github.com/repos/TygerBurning/Pandemic/branches{/branch}","tags_url":"https://api.github.com/repos/TygerBurning/Pandemic/tags","blobs_url":"https://api.github.com/repos/TygerBurning/Pandemic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TygerBurning/Pandemic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TygerBurning/Pandemic/git/refs{/sha}","trees_url":"https://api.github.com/repos/TygerBurning/Pandemic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TygerBurning/Pandemic/statuses/{sha}","languages_url":"https://api.github.com/repos/TygerBurning/Pandemic/languages","stargazers_url":"https://api.github.com/repos/TygerBurning/Pandemic/stargazers","contributors_url":"https://api.github.com/repos/TygerBurning/Pandemic/contributors","subscribers_url":"https://api.github.com/repos/TygerBurning/Pandemic/subscribers","subscription_url":"https://api.github.com/repos/TygerBurning/Pandemic/subscription","commits_url":"https://api.github.com/repos/TygerBurning/Pandemic/commits{/sha}","git_commits_url":"https://api.github.com/repos/TygerBurning/Pandemic/git/commits{/sha}","comments_url":"https://api.github.com/repos/TygerBurning/Pandemic/comments{/number}","issue_comment_url":"https://api.github.com/repos/TygerBurning/Pandemic/issues/comments{/number}","contents_url":"https://api.github.com/repos/TygerBurning/Pandemic/contents/{+path}","compare_url":"https://api.github.com/repos/TygerBurning/Pandemic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TygerBurning/Pandemic/merges","archive_url":"https://api.github.com/repos/TygerBurning/Pandemic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TygerBurning/Pandemic/downloads","issues_url":"https://api.github.com/repos/TygerBurning/Pandemic/issues{/number}","pulls_url":"https://api.github.com/repos/TygerBurning/Pandemic/pulls{/number}","milestones_url":"https://api.github.com/repos/TygerBurning/Pandemic/milestones{/number}","notifications_url":"https://api.github.com/repos/TygerBurning/Pandemic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TygerBurning/Pandemic/labels{/name}","releases_url":"https://api.github.com/repos/TygerBurning/Pandemic/releases{/id}","deployments_url":"https://api.github.com/repos/TygerBurning/Pandemic/deployments","created_at":"2016-03-13T23:48:52Z","updated_at":"2016-08-10T19:21:00Z","pushed_at":"2016-08-31T19:14:22Z","git_url":"git://github.com/TygerBurning/Pandemic.git","ssh_url":"git@github.com:TygerBurning/Pandemic.git","clone_url":"https://github.com/TygerBurning/Pandemic.git","svn_url":"https://github.com/TygerBurning/Pandemic","homepage":null,"size":6317,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":12,"forks":0,"open_issues":12,"watchers":0,"default_branch":"master"}},"base":{"label":"TygerBurning:master","ref":"master","sha":"81ced6184b04ce4e60a2bc8929db4080c4452c0f","user":{"login":"TygerBurning","id":6792948,"avatar_url":"https://avatars.githubusercontent.com/u/6792948?v=3","gravatar_id":"","url":"https://api.github.com/users/TygerBurning","html_url":"https://github.com/TygerBurning","followers_url":"https://api.github.com/users/TygerBurning/followers","following_url":"https://api.github.com/users/TygerBurning/following{/other_user}","gists_url":"https://api.github.com/users/TygerBurning/gists{/gist_id}","starred_url":"https://api.github.com/users/TygerBurning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TygerBurning/subscriptions","organizations_url":"https://api.github.com/users/TygerBurning/orgs","repos_url":"https://api.github.com/users/TygerBurning/repos","events_url":"https://api.github.com/users/TygerBurning/events{/privacy}","received_events_url":"https://api.github.com/users/TygerBurning/received_events","type":"User","site_admin":false},"repo":{"id":53813998,"name":"Pandemic","full_name":"TygerBurning/Pandemic","owner":{"login":"TygerBurning","id":6792948,"avatar_url":"https://avatars.githubusercontent.com/u/6792948?v=3","gravatar_id":"","url":"https://api.github.com/users/TygerBurning","html_url":"https://github.com/TygerBurning","followers_url":"https://api.github.com/users/TygerBurning/followers","following_url":"https://api.github.com/users/TygerBurning/following{/other_user}","gists_url":"https://api.github.com/users/TygerBurning/gists{/gist_id}","starred_url":"https://api.github.com/users/TygerBurning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TygerBurning/subscriptions","organizations_url":"https://api.github.com/users/TygerBurning/orgs","repos_url":"https://api.github.com/users/TygerBurning/repos","events_url":"https://api.github.com/users/TygerBurning/events{/privacy}","received_events_url":"https://api.github.com/users/TygerBurning/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/TygerBurning/Pandemic","description":"","fork":false,"url":"https://api.github.com/repos/TygerBurning/Pandemic","forks_url":"https://api.github.com/repos/TygerBurning/Pandemic/forks","keys_url":"https://api.github.com/repos/TygerBurning/Pandemic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TygerBurning/Pandemic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TygerBurning/Pandemic/teams","hooks_url":"https://api.github.com/repos/TygerBurning/Pandemic/hooks","issue_events_url":"https://api.github.com/repos/TygerBurning/Pandemic/issues/events{/number}","events_url":"https://api.github.com/repos/TygerBurning/Pandemic/events","assignees_url":"https://api.github.com/repos/TygerBurning/Pandemic/assignees{/user}","branches_url":"https://api.github.com/repos/TygerBurning/Pandemic/branches{/branch}","tags_url":"https://api.github.com/repos/TygerBurning/Pandemic/tags","blobs_url":"https://api.github.com/repos/TygerBurning/Pandemic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TygerBurning/Pandemic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TygerBurning/Pandemic/git/refs{/sha}","trees_url":"https://api.github.com/repos/TygerBurning/Pandemic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TygerBurning/Pandemic/statuses/{sha}","languages_url":"https://api.github.com/repos/TygerBurning/Pandemic/languages","stargazers_url":"https://api.github.com/repos/TygerBurning/Pandemic/stargazers","contributors_url":"https://api.github.com/repos/TygerBurning/Pandemic/contributors","subscribers_url":"https://api.github.com/repos/TygerBurning/Pandemic/subscribers","subscription_url":"https://api.github.com/repos/TygerBurning/Pandemic/subscription","commits_url":"https://api.github.com/repos/TygerBurning/Pandemic/commits{/sha}","git_commits_url":"https://api.github.com/repos/TygerBurning/Pandemic/git/commits{/sha}","comments_url":"https://api.github.com/repos/TygerBurning/Pandemic/comments{/number}","issue_comment_url":"https://api.github.com/repos/TygerBurning/Pandemic/issues/comments{/number}","contents_url":"https://api.github.com/repos/TygerBurning/Pandemic/contents/{+path}","compare_url":"https://api.github.com/repos/TygerBurning/Pandemic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TygerBurning/Pandemic/merges","archive_url":"https://api.github.com/repos/TygerBurning/Pandemic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TygerBurning/Pandemic/downloads","issues_url":"https://api.github.com/repos/TygerBurning/Pandemic/issues{/number}","pulls_url":"https://api.github.com/repos/TygerBurning/Pandemic/pulls{/number}","milestones_url":"https://api.github.com/repos/TygerBurning/Pandemic/milestones{/number}","notifications_url":"https://api.github.com/repos/TygerBurning/Pandemic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TygerBurning/Pandemic/labels{/name}","releases_url":"https://api.github.com/repos/TygerBurning/Pandemic/releases{/id}","deployments_url":"https://api.github.com/repos/TygerBurning/Pandemic/deployments","created_at":"2016-03-13T23:48:52Z","updated_at":"2016-08-10T19:21:00Z","pushed_at":"2016-08-31T19:14:22Z","git_url":"git://github.com/TygerBurning/Pandemic.git","ssh_url":"git@github.com:TygerBurning/Pandemic.git","clone_url":"https://github.com/TygerBurning/Pandemic.git","svn_url":"https://github.com/TygerBurning/Pandemic","homepage":null,"size":6317,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":12,"forks":0,"open_issues":12,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/TygerBurning/Pandemic/pulls/74"},"html":{"href":"https://github.com/TygerBurning/Pandemic/pull/74"},"issue":{"href":"https://api.github.com/repos/TygerBurning/Pandemic/issues/74"},"comments":{"href":"https://api.github.com/repos/TygerBurning/Pandemic/issues/74/comments"},"review_comments":{"href":"https://api.github.com/repos/TygerBurning/Pandemic/pulls/74/comments"},"review_comment":{"href":"https://api.github.com/repos/TygerBurning/Pandemic/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TygerBurning/Pandemic/pulls/74/commits"},"statuses":{"href":"https://api.github.com/repos/TygerBurning/Pandemic/statuses/27477e08948e3a2e06364be40ceef3c54ca0173c"}}}}
{"actor":{"display_login":"TygerBurning"}}