{"action":"created","comment":{"url":"https://api.github.com/repos/tw-oocamp-201512/homework/pulls/comments/48103094","id":48103094,"diff_hunk":"@@ -0,0 +1,49 @@\n+import oo.ParkingLot;\n+import org.junit.Test;\n+\n+import static junit.framework.Assert.assertEquals;\n+import static junit.framework.Assert.assertNotSame;\n+\n+public class ParkingLotTest {\n+\n+    @Test\n+    public void testParkSuccessReturnSerialNumWhenThereIsSpace() throws Exception {\n+        ParkingLot parkingLot = new ParkingLot(1);\n+        assertNotSame(\"0\", parkingLot.park(\"ShanA123\"));\n+    }\n+\n+    @Test\n+    public void testParkFailReturn0WhenThereIsNoSpace() throws Exception {\n+        ParkingLot parkingLot = new ParkingLot(1);\n+        parkingLot.park(\"ShanA123\");\n+        assertEquals(\"0\", parkingLot.park(\"ShanA123\"));\n+    }\n+\n+    @Test\n+    public void testLeaveSuccessWhenSerialNumIsCorrect() throws Exception {\n+        ParkingLot parkingLot = new ParkingLot(1);\n+        String serialNum = parkingLot.park(\"ShanA123\");\n+        assertEquals(\"ShanA123\", parkingLot.leave(serialNum));\n+    }\n+\n+    @Test\n+    public void testLeaveFailWhenSerialNumIsIncorrect() throws Exception {\n+        ParkingLot parkingLot = new ParkingLot(2);\n+        String serialNum = parkingLot.park(\"ShanA123\");\n+        assertEquals(null, parkingLot.leave(serialNum+\"1\"));","path":"homework3/Wanlu/test/ParkingLotTest.java","position":33,"original_position":33,"commit_id":"781f79886919912f083d90e92c3ab3e6e7fc4b82","original_commit_id":"781f79886919912f083d90e92c3ab3e6e7fc4b82","user":{"login":"freewind","id":333781,"avatar_url":"https://avatars.githubusercontent.com/u/333781?v=3","gravatar_id":"","url":"https://api.github.com/users/freewind","html_url":"https://github.com/freewind","followers_url":"https://api.github.com/users/freewind/followers","following_url":"https://api.github.com/users/freewind/following{/other_user}","gists_url":"https://api.github.com/users/freewind/gists{/gist_id}","starred_url":"https://api.github.com/users/freewind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freewind/subscriptions","organizations_url":"https://api.github.com/users/freewind/orgs","repos_url":"https://api.github.com/users/freewind/repos","events_url":"https://api.github.com/users/freewind/events{/privacy}","received_events_url":"https://api.github.com/users/freewind/received_events","type":"User","site_admin":false},"body":"`serialNum+\"1\"`，这个不太好，不容易看出来它是不正确的情况。换成如`invalid-serial-num`这样的字符串更好","created_at":"2015-12-20T12:54:17Z","updated_at":"2015-12-20T12:54:17Z","html_url":"https://github.com/tw-oocamp-201512/homework/pull/47#discussion_r48103094","pull_request_url":"https://api.github.com/repos/tw-oocamp-201512/homework/pulls/47","_links":{"self":{"href":"https://api.github.com/repos/tw-oocamp-201512/homework/pulls/comments/48103094"},"html":{"href":"https://github.com/tw-oocamp-201512/homework/pull/47#discussion_r48103094"},"pull_request":{"href":"https://api.github.com/repos/tw-oocamp-201512/homework/pulls/47"}}},"pull_request":{"url":"https://api.github.com/repos/tw-oocamp-201512/homework/pulls/47","id":54192273,"html_url":"https://github.com/tw-oocamp-201512/homework/pull/47","diff_url":"https://github.com/tw-oocamp-201512/homework/pull/47.diff","patch_url":"https://github.com/tw-oocamp-201512/homework/pull/47.patch","issue_url":"https://api.github.com/repos/tw-oocamp-201512/homework/issues/47","number":47,"state":"open","locked":false,"title":"Wanlu homework 6","user":{"login":"niuwanlu","id":9380659,"avatar_url":"https://avatars.githubusercontent.com/u/9380659?v=3","gravatar_id":"","url":"https://api.github.com/users/niuwanlu","html_url":"https://github.com/niuwanlu","followers_url":"https://api.github.com/users/niuwanlu/followers","following_url":"https://api.github.com/users/niuwanlu/following{/other_user}","gists_url":"https://api.github.com/users/niuwanlu/gists{/gist_id}","starred_url":"https://api.github.com/users/niuwanlu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niuwanlu/subscriptions","organizations_url":"https://api.github.com/users/niuwanlu/orgs","repos_url":"https://api.github.com/users/niuwanlu/repos","events_url":"https://api.github.com/users/niuwanlu/events{/privacy}","received_events_url":"https://api.github.com/users/niuwanlu/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-12-20T03:44:25Z","updated_at":"2015-12-20T12:54:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7eb1dfa8836baac25ade80f8c118c5f8b267479f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tw-oocamp-201512/homework/pulls/47/commits","review_comments_url":"https://api.github.com/repos/tw-oocamp-201512/homework/pulls/47/comments","review_comment_url":"https://api.github.com/repos/tw-oocamp-201512/homework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tw-oocamp-201512/homework/issues/47/comments","statuses_url":"https://api.github.com/repos/tw-oocamp-201512/homework/statuses/781f79886919912f083d90e92c3ab3e6e7fc4b82","head":{"label":"niuwanlu:Wanlu_hw5","ref":"Wanlu_hw5","sha":"781f79886919912f083d90e92c3ab3e6e7fc4b82","user":{"login":"niuwanlu","id":9380659,"avatar_url":"https://avatars.githubusercontent.com/u/9380659?v=3","gravatar_id":"","url":"https://api.github.com/users/niuwanlu","html_url":"https://github.com/niuwanlu","followers_url":"https://api.github.com/users/niuwanlu/followers","following_url":"https://api.github.com/users/niuwanlu/following{/other_user}","gists_url":"https://api.github.com/users/niuwanlu/gists{/gist_id}","starred_url":"https://api.github.com/users/niuwanlu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niuwanlu/subscriptions","organizations_url":"https://api.github.com/users/niuwanlu/orgs","repos_url":"https://api.github.com/users/niuwanlu/repos","events_url":"https://api.github.com/users/niuwanlu/events{/privacy}","received_events_url":"https://api.github.com/users/niuwanlu/received_events","type":"User","site_admin":false},"repo":{"id":47455905,"name":"homework","full_name":"niuwanlu/homework","owner":{"login":"niuwanlu","id":9380659,"avatar_url":"https://avatars.githubusercontent.com/u/9380659?v=3","gravatar_id":"","url":"https://api.github.com/users/niuwanlu","html_url":"https://github.com/niuwanlu","followers_url":"https://api.github.com/users/niuwanlu/followers","following_url":"https://api.github.com/users/niuwanlu/following{/other_user}","gists_url":"https://api.github.com/users/niuwanlu/gists{/gist_id}","starred_url":"https://api.github.com/users/niuwanlu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niuwanlu/subscriptions","organizations_url":"https://api.github.com/users/niuwanlu/orgs","repos_url":"https://api.github.com/users/niuwanlu/repos","events_url":"https://api.github.com/users/niuwanlu/events{/privacy}","received_events_url":"https://api.github.com/users/niuwanlu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/niuwanlu/homework","description":"每节课的作业都提交到这个仓库里","fork":true,"url":"https://api.github.com/repos/niuwanlu/homework","forks_url":"https://api.github.com/repos/niuwanlu/homework/forks","keys_url":"https://api.github.com/repos/niuwanlu/homework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/niuwanlu/homework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/niuwanlu/homework/teams","hooks_url":"https://api.github.com/repos/niuwanlu/homework/hooks","issue_events_url":"https://api.github.com/repos/niuwanlu/homework/issues/events{/number}","events_url":"https://api.github.com/repos/niuwanlu/homework/events","assignees_url":"https://api.github.com/repos/niuwanlu/homework/assignees{/user}","branches_url":"https://api.github.com/repos/niuwanlu/homework/branches{/branch}","tags_url":"https://api.github.com/repos/niuwanlu/homework/tags","blobs_url":"https://api.github.com/repos/niuwanlu/homework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/niuwanlu/homework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/niuwanlu/homework/git/refs{/sha}","trees_url":"https://api.github.com/repos/niuwanlu/homework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/niuwanlu/homework/statuses/{sha}","languages_url":"https://api.github.com/repos/niuwanlu/homework/languages","stargazers_url":"https://api.github.com/repos/niuwanlu/homework/stargazers","contributors_url":"https://api.github.com/repos/niuwanlu/homework/contributors","subscribers_url":"https://api.github.com/repos/niuwanlu/homework/subscribers","subscription_url":"https://api.github.com/repos/niuwanlu/homework/subscription","commits_url":"https://api.github.com/repos/niuwanlu/homework/commits{/sha}","git_commits_url":"https://api.github.com/repos/niuwanlu/homework/git/commits{/sha}","comments_url":"https://api.github.com/repos/niuwanlu/homework/comments{/number}","issue_comment_url":"https://api.github.com/repos/niuwanlu/homework/issues/comments{/number}","contents_url":"https://api.github.com/repos/niuwanlu/homework/contents/{+path}","compare_url":"https://api.github.com/repos/niuwanlu/homework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/niuwanlu/homework/merges","archive_url":"https://api.github.com/repos/niuwanlu/homework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/niuwanlu/homework/downloads","issues_url":"https://api.github.com/repos/niuwanlu/homework/issues{/number}","pulls_url":"https://api.github.com/repos/niuwanlu/homework/pulls{/number}","milestones_url":"https://api.github.com/repos/niuwanlu/homework/milestones{/number}","notifications_url":"https://api.github.com/repos/niuwanlu/homework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/niuwanlu/homework/labels{/name}","releases_url":"https://api.github.com/repos/niuwanlu/homework/releases{/id}","created_at":"2015-12-05T12:59:31Z","updated_at":"2015-12-05T12:59:32Z","pushed_at":"2015-12-20T03:42:09Z","git_url":"git://github.com/niuwanlu/homework.git","ssh_url":"git@github.com:niuwanlu/homework.git","clone_url":"https://github.com/niuwanlu/homework.git","svn_url":"https://github.com/niuwanlu/homework","homepage":null,"size":325,"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":"tw-oocamp-201512:master","ref":"master","sha":"31ac64e48de127ce1988f7a4a84d3d21e3bd1872","user":{"login":"tw-oocamp-201512","id":15956012,"avatar_url":"https://avatars.githubusercontent.com/u/15956012?v=3","gravatar_id":"","url":"https://api.github.com/users/tw-oocamp-201512","html_url":"https://github.com/tw-oocamp-201512","followers_url":"https://api.github.com/users/tw-oocamp-201512/followers","following_url":"https://api.github.com/users/tw-oocamp-201512/following{/other_user}","gists_url":"https://api.github.com/users/tw-oocamp-201512/gists{/gist_id}","starred_url":"https://api.github.com/users/tw-oocamp-201512/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tw-oocamp-201512/subscriptions","organizations_url":"https://api.github.com/users/tw-oocamp-201512/orgs","repos_url":"https://api.github.com/users/tw-oocamp-201512/repos","events_url":"https://api.github.com/users/tw-oocamp-201512/events{/privacy}","received_events_url":"https://api.github.com/users/tw-oocamp-201512/received_events","type":"Organization","site_admin":false},"repo":{"id":47126503,"name":"homework","full_name":"tw-oocamp-201512/homework","owner":{"login":"tw-oocamp-201512","id":15956012,"avatar_url":"https://avatars.githubusercontent.com/u/15956012?v=3","gravatar_id":"","url":"https://api.github.com/users/tw-oocamp-201512","html_url":"https://github.com/tw-oocamp-201512","followers_url":"https://api.github.com/users/tw-oocamp-201512/followers","following_url":"https://api.github.com/users/tw-oocamp-201512/following{/other_user}","gists_url":"https://api.github.com/users/tw-oocamp-201512/gists{/gist_id}","starred_url":"https://api.github.com/users/tw-oocamp-201512/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tw-oocamp-201512/subscriptions","organizations_url":"https://api.github.com/users/tw-oocamp-201512/orgs","repos_url":"https://api.github.com/users/tw-oocamp-201512/repos","events_url":"https://api.github.com/users/tw-oocamp-201512/events{/privacy}","received_events_url":"https://api.github.com/users/tw-oocamp-201512/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tw-oocamp-201512/homework","description":"每节课的作业都提交到这个仓库里","fork":false,"url":"https://api.github.com/repos/tw-oocamp-201512/homework","forks_url":"https://api.github.com/repos/tw-oocamp-201512/homework/forks","keys_url":"https://api.github.com/repos/tw-oocamp-201512/homework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tw-oocamp-201512/homework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tw-oocamp-201512/homework/teams","hooks_url":"https://api.github.com/repos/tw-oocamp-201512/homework/hooks","issue_events_url":"https://api.github.com/repos/tw-oocamp-201512/homework/issues/events{/number}","events_url":"https://api.github.com/repos/tw-oocamp-201512/homework/events","assignees_url":"https://api.github.com/repos/tw-oocamp-201512/homework/assignees{/user}","branches_url":"https://api.github.com/repos/tw-oocamp-201512/homework/branches{/branch}","tags_url":"https://api.github.com/repos/tw-oocamp-201512/homework/tags","blobs_url":"https://api.github.com/repos/tw-oocamp-201512/homework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tw-oocamp-201512/homework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tw-oocamp-201512/homework/git/refs{/sha}","trees_url":"https://api.github.com/repos/tw-oocamp-201512/homework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tw-oocamp-201512/homework/statuses/{sha}","languages_url":"https://api.github.com/repos/tw-oocamp-201512/homework/languages","stargazers_url":"https://api.github.com/repos/tw-oocamp-201512/homework/stargazers","contributors_url":"https://api.github.com/repos/tw-oocamp-201512/homework/contributors","subscribers_url":"https://api.github.com/repos/tw-oocamp-201512/homework/subscribers","subscription_url":"https://api.github.com/repos/tw-oocamp-201512/homework/subscription","commits_url":"https://api.github.com/repos/tw-oocamp-201512/homework/commits{/sha}","git_commits_url":"https://api.github.com/repos/tw-oocamp-201512/homework/git/commits{/sha}","comments_url":"https://api.github.com/repos/tw-oocamp-201512/homework/comments{/number}","issue_comment_url":"https://api.github.com/repos/tw-oocamp-201512/homework/issues/comments{/number}","contents_url":"https://api.github.com/repos/tw-oocamp-201512/homework/contents/{+path}","compare_url":"https://api.github.com/repos/tw-oocamp-201512/homework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tw-oocamp-201512/homework/merges","archive_url":"https://api.github.com/repos/tw-oocamp-201512/homework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tw-oocamp-201512/homework/downloads","issues_url":"https://api.github.com/repos/tw-oocamp-201512/homework/issues{/number}","pulls_url":"https://api.github.com/repos/tw-oocamp-201512/homework/pulls{/number}","milestones_url":"https://api.github.com/repos/tw-oocamp-201512/homework/milestones{/number}","notifications_url":"https://api.github.com/repos/tw-oocamp-201512/homework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tw-oocamp-201512/homework/labels{/name}","releases_url":"https://api.github.com/repos/tw-oocamp-201512/homework/releases{/id}","created_at":"2015-11-30T15:07:18Z","updated_at":"2015-12-06T22:06:59Z","pushed_at":"2015-12-20T03:44:26Z","git_url":"git://github.com/tw-oocamp-201512/homework.git","ssh_url":"git@github.com:tw-oocamp-201512/homework.git","clone_url":"https://github.com/tw-oocamp-201512/homework.git","svn_url":"https://github.com/tw-oocamp-201512/homework","homepage":null,"size":653,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":20,"forks":15,"open_issues":20,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tw-oocamp-201512/homework/pulls/47"},"html":{"href":"https://github.com/tw-oocamp-201512/homework/pull/47"},"issue":{"href":"https://api.github.com/repos/tw-oocamp-201512/homework/issues/47"},"comments":{"href":"https://api.github.com/repos/tw-oocamp-201512/homework/issues/47/comments"},"review_comments":{"href":"https://api.github.com/repos/tw-oocamp-201512/homework/pulls/47/comments"},"review_comment":{"href":"https://api.github.com/repos/tw-oocamp-201512/homework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tw-oocamp-201512/homework/pulls/47/commits"},"statuses":{"href":"https://api.github.com/repos/tw-oocamp-201512/homework/statuses/781f79886919912f083d90e92c3ab3e6e7fc4b82"}}}}