{"action":"created","comment":{"url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/pulls/comments/26926210","id":26926210,"diff_hunk":"@@ -0,0 +1,137 @@\n+package ru.fizteh.fivt.students.MaximGotovchits.Parallel.test;\n+\n+import static org.junit.Assert.assertEquals;\n+import static org.junit.Assert.assertNull;\n+import static org.junit.Assert.assertTrue;\n+\n+import org.junit.*;\n+import ru.fizteh.fivt.students.MaximGotovchits.Parallel.base.commands.Use;\n+import ru.fizteh.fivt.students.MaximGotovchits.Parallel.objects.ObjectStoreable;\n+import ru.fizteh.fivt.students.MaximGotovchits.Parallel.objects.ObjectTable;\n+import ru.fizteh.fivt.students.MaximGotovchits.Parallel.objects.ObjectTableProvider;\n+\n+import java.io.IOException;\n+import java.util.LinkedList;\n+import java.util.List;\n+\n+public class ObjectTableTest {\n+    private String name;\n+    private List<Class<?>> columnTypes = new LinkedList<Class<?>>();\n+    private ObjectStoreable deserializedValue = new ObjectStoreable();\n+    private ObjectTable testTable;\n+\n+    @Before\n+    public void initialization() throws IOException {\n+        name = \"TestTable\";\n+        columnTypes.add(int.class);\n+        columnTypes.add(long.class);\n+        testTable = (ObjectTable) new ObjectTableProvider().createTable(name, columnTypes);\n+        deserializedValue.getSubValueList().add(100500);\n+        deserializedValue.getSubValueList().add((long) 10000000);\n+        deserializedValue.setTypeKeeper(columnTypes);\n+        deserializedValue.setSerialisedValue(\"[100500, 10000000]\");\n+    }\n+\n+    @Test\n+    public void getNameTest() throws Exception {\n+        assertEquals(name, testTable.getName());\n+    }\n+\n+    @Test\n+    public void putTest() throws Exception {\n+        new Use().useFunction(name, null);\n+        assertNull(testTable.put(\"Key\", deserializedValue));\n+        assertEquals(deserializedValue, testTable.put(\"Key\", deserializedValue));\n+    }\n+\n+    @Test\n+    public void getTest() throws Exception {\n+        new Use().useFunction(name, null);\n+        testTable.put(\"Key\", deserializedValue);\n+        assertEquals(deserializedValue, testTable.get(\"Key\"));\n+    }\n+\n+    @Test\n+    public void sizeTest() throws Exception {\n+        new Use().useFunction(name, null);\n+        for (Integer i = 0; i < 3; ++i) {\n+            testTable.put(i.toString(), deserializedValue);\n+        }\n+        assertEquals(3, testTable.size());\n+    }\n+\n+    @Test\n+    public void listTest() throws Exception {\n+        new Use().useFunction(name, null);\n+        List<String> toCompare = new LinkedList<String>();\n+        for (Integer i = 0; i < 3; ++i) {\n+            toCompare.add(i.toString());\n+            testTable.put(i.toString(), deserializedValue);\n+        }\n+        assertTrue(toCompare.containsAll(testTable.list()));\n+    }\n+\n+    @Test\n+    public void removeTest() throws Exception {\n+        new Use().useFunction(name, null);\n+        testTable.put(\"Key\", deserializedValue);\n+        assertEquals(deserializedValue, testTable.remove(\"Key\"));\n+    }\n+\n+    @Test\n+    public void commitTest() {\n+        for (Integer i = 0; i < 3; ++i) {\n+            testTable.put(i.toString(), deserializedValue);\n+        }\n+        assertEquals(deserializedValue, testTable.get(\"0\"));\n+        assertEquals(deserializedValue, testTable.get(\"1\"));\n+        assertEquals(deserializedValue, testTable.get(\"2\"));\n+        assertEquals(3, testTable.commit());\n+        assertEquals(deserializedValue, testTable.get(\"0\"));\n+        assertEquals(deserializedValue, testTable.get(\"1\"));\n+        assertEquals(deserializedValue, testTable.get(\"2\"));\n+    }\n+\n+    @Test\n+    public void rollbackTest() {\n+        for (Integer i = 0; i < 3; ++i) {\n+            testTable.put(i.toString(), deserializedValue);\n+        }\n+        assertEquals(deserializedValue, testTable.get(\"0\"));\n+        assertEquals(deserializedValue, testTable.get(\"1\"));\n+        assertEquals(deserializedValue, testTable.get(\"2\"));\n+        assertEquals(3, testTable.rollback());\n+        assertNull(testTable.get(\"0\"));\n+        assertNull(testTable.get(\"1\"));\n+        assertNull(testTable.get(\"2\"));","path":"src/ru/fizteh/fivt/students/MaximGotovchits/Parallel/test/ObjectTableTest.java","position":106,"original_position":106,"commit_id":"a846f09f724c89fe62a1e917ba122164a3019c58","original_commit_id":"3985e62054ca44c2a69eea09283a615a912aaeaa","user":{"login":"MaximGotovchits","id":8759433,"avatar_url":"https://avatars.githubusercontent.com/u/8759433?v=3","gravatar_id":"","url":"https://api.github.com/users/MaximGotovchits","html_url":"https://github.com/MaximGotovchits","followers_url":"https://api.github.com/users/MaximGotovchits/followers","following_url":"https://api.github.com/users/MaximGotovchits/following{/other_user}","gists_url":"https://api.github.com/users/MaximGotovchits/gists{/gist_id}","starred_url":"https://api.github.com/users/MaximGotovchits/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaximGotovchits/subscriptions","organizations_url":"https://api.github.com/users/MaximGotovchits/orgs","repos_url":"https://api.github.com/users/MaximGotovchits/repos","events_url":"https://api.github.com/users/MaximGotovchits/events{/privacy}","received_events_url":"https://api.github.com/users/MaximGotovchits/received_events","type":"User","site_admin":false},"body":"Исправил","created_at":"2015-03-23T10:34:41Z","updated_at":"2015-03-23T10:34:41Z","html_url":"https://github.com/dkomanov/fizteh-java-2014/pull/602#discussion_r26926210","pull_request_url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/pulls/602","_links":{"self":{"href":"https://api.github.com/repos/dkomanov/fizteh-java-2014/pulls/comments/26926210"},"html":{"href":"https://github.com/dkomanov/fizteh-java-2014/pull/602#discussion_r26926210"},"pull_request":{"href":"https://api.github.com/repos/dkomanov/fizteh-java-2014/pulls/602"}}},"pull_request":{"url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/pulls/602","id":31686278,"html_url":"https://github.com/dkomanov/fizteh-java-2014/pull/602","diff_url":"https://github.com/dkomanov/fizteh-java-2014/pull/602.diff","patch_url":"https://github.com/dkomanov/fizteh-java-2014/pull/602.patch","issue_url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/issues/602","number":602,"state":"open","locked":false,"title":"Parallel1.1","user":{"login":"MaximGotovchits","id":8759433,"avatar_url":"https://avatars.githubusercontent.com/u/8759433?v=3","gravatar_id":"","url":"https://api.github.com/users/MaximGotovchits","html_url":"https://github.com/MaximGotovchits","followers_url":"https://api.github.com/users/MaximGotovchits/followers","following_url":"https://api.github.com/users/MaximGotovchits/following{/other_user}","gists_url":"https://api.github.com/users/MaximGotovchits/gists{/gist_id}","starred_url":"https://api.github.com/users/MaximGotovchits/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaximGotovchits/subscriptions","organizations_url":"https://api.github.com/users/MaximGotovchits/orgs","repos_url":"https://api.github.com/users/MaximGotovchits/repos","events_url":"https://api.github.com/users/MaximGotovchits/events{/privacy}","received_events_url":"https://api.github.com/users/MaximGotovchits/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-22T11:08:59Z","updated_at":"2015-03-23T10:34:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f4b5c26f2bd144e6363ef1b7f91a1c0c0812953e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/pulls/602/commits","review_comments_url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/pulls/602/comments","review_comment_url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/issues/602/comments","statuses_url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/statuses/a846f09f724c89fe62a1e917ba122164a3019c58","head":{"label":"MaximGotovchits:Parallel1.1","ref":"Parallel1.1","sha":"a846f09f724c89fe62a1e917ba122164a3019c58","user":{"login":"MaximGotovchits","id":8759433,"avatar_url":"https://avatars.githubusercontent.com/u/8759433?v=3","gravatar_id":"","url":"https://api.github.com/users/MaximGotovchits","html_url":"https://github.com/MaximGotovchits","followers_url":"https://api.github.com/users/MaximGotovchits/followers","following_url":"https://api.github.com/users/MaximGotovchits/following{/other_user}","gists_url":"https://api.github.com/users/MaximGotovchits/gists{/gist_id}","starred_url":"https://api.github.com/users/MaximGotovchits/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaximGotovchits/subscriptions","organizations_url":"https://api.github.com/users/MaximGotovchits/orgs","repos_url":"https://api.github.com/users/MaximGotovchits/repos","events_url":"https://api.github.com/users/MaximGotovchits/events{/privacy}","received_events_url":"https://api.github.com/users/MaximGotovchits/received_events","type":"User","site_admin":false},"repo":{"id":26563334,"name":"fizteh-java-2014","full_name":"MaximGotovchits/fizteh-java-2014","owner":{"login":"MaximGotovchits","id":8759433,"avatar_url":"https://avatars.githubusercontent.com/u/8759433?v=3","gravatar_id":"","url":"https://api.github.com/users/MaximGotovchits","html_url":"https://github.com/MaximGotovchits","followers_url":"https://api.github.com/users/MaximGotovchits/followers","following_url":"https://api.github.com/users/MaximGotovchits/following{/other_user}","gists_url":"https://api.github.com/users/MaximGotovchits/gists{/gist_id}","starred_url":"https://api.github.com/users/MaximGotovchits/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaximGotovchits/subscriptions","organizations_url":"https://api.github.com/users/MaximGotovchits/orgs","repos_url":"https://api.github.com/users/MaximGotovchits/repos","events_url":"https://api.github.com/users/MaximGotovchits/events{/privacy}","received_events_url":"https://api.github.com/users/MaximGotovchits/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MaximGotovchits/fizteh-java-2014","description":"","fork":true,"url":"https://api.github.com/repos/MaximGotovchits/fizteh-java-2014","forks_url":"https://api.github.com/repos/MaximGotovchits/fizteh-java-2014/forks","keys_url":"https://api.github.com/repos/MaximGotovchits/fizteh-java-2014/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MaximGotovchits/fizteh-java-2014/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MaximGotovchits/fizteh-java-2014/teams","hooks_url":"https://api.github.com/repos/MaximGotovchits/fizteh-java-2014/hooks","issue_events_url":"https://api.github.com/repos/MaximGotovchits/fizteh-java-2014/issues/events{/number}","events_url":"https://api.github.com/repos/MaximGotovchits/fizteh-java-2014/events","assignees_url":"https://api.github.com/repos/MaximGotovchits/fizteh-java-2014/assignees{/user}","branches_url":"https://api.github.com/repos/MaximGotovchits/fizteh-java-2014/branches{/branch}","tags_url":"https://api.github.com/repos/MaximGotovchits/fizteh-java-2014/tags","blobs_url":"https://api.github.com/repos/MaximGotovchits/fizteh-java-2014/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MaximGotovchits/fizteh-java-2014/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MaximGotovchits/fizteh-java-2014/git/refs{/sha}","trees_url":"https://api.github.com/repos/MaximGotovchits/fizteh-java-2014/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MaximGotovchits/fizteh-java-2014/statuses/{sha}","languages_url":"https://api.github.com/repos/MaximGotovchits/fizteh-java-2014/languages","stargazers_url":"https://api.github.com/repos/MaximGotovchits/fizteh-java-2014/stargazers","contributors_url":"https://api.github.com/repos/MaximGotovchits/fizteh-java-2014/contributors","subscribers_url":"https://api.github.com/repos/MaximGotovchits/fizteh-java-2014/subscribers","subscription_url":"https://api.github.com/repos/MaximGotovchits/fizteh-java-2014/subscription","commits_url":"https://api.github.com/repos/MaximGotovchits/fizteh-java-2014/commits{/sha}","git_commits_url":"https://api.github.com/repos/MaximGotovchits/fizteh-java-2014/git/commits{/sha}","comments_url":"https://api.github.com/repos/MaximGotovchits/fizteh-java-2014/comments{/number}","issue_comment_url":"https://api.github.com/repos/MaximGotovchits/fizteh-java-2014/issues/comments{/number}","contents_url":"https://api.github.com/repos/MaximGotovchits/fizteh-java-2014/contents/{+path}","compare_url":"https://api.github.com/repos/MaximGotovchits/fizteh-java-2014/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MaximGotovchits/fizteh-java-2014/merges","archive_url":"https://api.github.com/repos/MaximGotovchits/fizteh-java-2014/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MaximGotovchits/fizteh-java-2014/downloads","issues_url":"https://api.github.com/repos/MaximGotovchits/fizteh-java-2014/issues{/number}","pulls_url":"https://api.github.com/repos/MaximGotovchits/fizteh-java-2014/pulls{/number}","milestones_url":"https://api.github.com/repos/MaximGotovchits/fizteh-java-2014/milestones{/number}","notifications_url":"https://api.github.com/repos/MaximGotovchits/fizteh-java-2014/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MaximGotovchits/fizteh-java-2014/labels{/name}","releases_url":"https://api.github.com/repos/MaximGotovchits/fizteh-java-2014/releases{/id}","created_at":"2014-11-13T00:42:39Z","updated_at":"2014-11-13T00:42:42Z","pushed_at":"2015-03-23T01:42:54Z","git_url":"git://github.com/MaximGotovchits/fizteh-java-2014.git","ssh_url":"git@github.com:MaximGotovchits/fizteh-java-2014.git","clone_url":"https://github.com/MaximGotovchits/fizteh-java-2014.git","svn_url":"https://github.com/MaximGotovchits/fizteh-java-2014","homepage":null,"size":12180,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"dkomanov:master","ref":"master","sha":"da301fdee510377d59ec86f8cf5dcc9960ba3156","user":{"login":"dkomanov","id":1158662,"avatar_url":"https://avatars.githubusercontent.com/u/1158662?v=3","gravatar_id":"","url":"https://api.github.com/users/dkomanov","html_url":"https://github.com/dkomanov","followers_url":"https://api.github.com/users/dkomanov/followers","following_url":"https://api.github.com/users/dkomanov/following{/other_user}","gists_url":"https://api.github.com/users/dkomanov/gists{/gist_id}","starred_url":"https://api.github.com/users/dkomanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkomanov/subscriptions","organizations_url":"https://api.github.com/users/dkomanov/orgs","repos_url":"https://api.github.com/users/dkomanov/repos","events_url":"https://api.github.com/users/dkomanov/events{/privacy}","received_events_url":"https://api.github.com/users/dkomanov/received_events","type":"User","site_admin":false},"repo":{"id":23866876,"name":"fizteh-java-2014","full_name":"dkomanov/fizteh-java-2014","owner":{"login":"dkomanov","id":1158662,"avatar_url":"https://avatars.githubusercontent.com/u/1158662?v=3","gravatar_id":"","url":"https://api.github.com/users/dkomanov","html_url":"https://github.com/dkomanov","followers_url":"https://api.github.com/users/dkomanov/followers","following_url":"https://api.github.com/users/dkomanov/following{/other_user}","gists_url":"https://api.github.com/users/dkomanov/gists{/gist_id}","starred_url":"https://api.github.com/users/dkomanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkomanov/subscriptions","organizations_url":"https://api.github.com/users/dkomanov/orgs","repos_url":"https://api.github.com/users/dkomanov/repos","events_url":"https://api.github.com/users/dkomanov/events{/privacy}","received_events_url":"https://api.github.com/users/dkomanov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dkomanov/fizteh-java-2014","description":"","fork":false,"url":"https://api.github.com/repos/dkomanov/fizteh-java-2014","forks_url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/forks","keys_url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/teams","hooks_url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/hooks","issue_events_url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/issues/events{/number}","events_url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/events","assignees_url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/assignees{/user}","branches_url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/branches{/branch}","tags_url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/tags","blobs_url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/git/refs{/sha}","trees_url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/statuses/{sha}","languages_url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/languages","stargazers_url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/stargazers","contributors_url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/contributors","subscribers_url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/subscribers","subscription_url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/subscription","commits_url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/commits{/sha}","git_commits_url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/git/commits{/sha}","comments_url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/comments{/number}","issue_comment_url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/issues/comments{/number}","contents_url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/contents/{+path}","compare_url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/merges","archive_url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/downloads","issues_url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/issues{/number}","pulls_url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/pulls{/number}","milestones_url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/milestones{/number}","notifications_url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/labels{/name}","releases_url":"https://api.github.com/repos/dkomanov/fizteh-java-2014/releases{/id}","created_at":"2014-09-10T08:32:49Z","updated_at":"2015-03-01T17:14:28Z","pushed_at":"2015-03-23T01:42:55Z","git_url":"git://github.com/dkomanov/fizteh-java-2014.git","ssh_url":"git@github.com:dkomanov/fizteh-java-2014.git","clone_url":"https://github.com/dkomanov/fizteh-java-2014.git","svn_url":"https://github.com/dkomanov/fizteh-java-2014","homepage":null,"size":36219,"stargazers_count":7,"watchers_count":7,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":84,"mirror_url":null,"open_issues_count":55,"forks":84,"open_issues":55,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dkomanov/fizteh-java-2014/pulls/602"},"html":{"href":"https://github.com/dkomanov/fizteh-java-2014/pull/602"},"issue":{"href":"https://api.github.com/repos/dkomanov/fizteh-java-2014/issues/602"},"comments":{"href":"https://api.github.com/repos/dkomanov/fizteh-java-2014/issues/602/comments"},"review_comments":{"href":"https://api.github.com/repos/dkomanov/fizteh-java-2014/pulls/602/comments"},"review_comment":{"href":"https://api.github.com/repos/dkomanov/fizteh-java-2014/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dkomanov/fizteh-java-2014/pulls/602/commits"},"statuses":{"href":"https://api.github.com/repos/dkomanov/fizteh-java-2014/statuses/a846f09f724c89fe62a1e917ba122164a3019c58"}}}}