{"action":"created","comment":{"url":"https://api.github.com/repos/codingmentor/homeworks/pulls/comments/72517253","id":72517253,"diff_hunk":"@@ -0,0 +1,72 @@\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 com.gergelyszebenyi.homework.beanvalidation.db;\n+\n+import com.gergelyszebenyi.homework.beanvalidation.beans.UserDTO;\n+import com.gergelyszebenyi.homework.beanvalidation.enums.Sex;\n+import java.util.Calendar;\n+import java.util.Date;\n+import org.junit.Before;\n+import org.junit.Test;\n+import static org.junit.Assert.*;\n+\n+/**\n+ *\n+ * @author szebenyigergely\n+ */\n+public class UserDBTest {\n+\n+    private UserDTO user;\n+    private UserDB userDB;\n+    private Calendar calendar;\n+\n+    @Before\n+    public void beforeTest() {\n+\n+        // This will be the registration date        \n+        calendar = Calendar.getInstance();\n+        calendar.set(1990, 10, 10);\n+        Date regDate = calendar.getTime();\n+\n+        // This will be the birth date\n+        calendar.set(1980, 10, 10);\n+        Date birthDate = calendar.getTime();\n+\n+        user = new UserDTO.Builder()\n+                .userName(\"JohnWick\")\n+                .password(\"MyNameIsJohnWick333\")\n+                .firstName(\"John\")\n+                .lastName(\"Wick\")\n+                .email(\"johnwick@gutripper.net\")\n+                .address(\"3123 Lousinana\")\n+                .phone(\"06333666333\")\n+                .registrationDate(regDate)\n+                .dateOfBirth(birthDate)\n+                .admin(true)\n+                .sex(Sex.MALE)\n+                .build();\n+\n+        userDB = new UserDB();\n+        userDB.registrate(user);\n+    }\n+\n+    @Test\n+    public void testRegistrate() {\n+        assertEquals(user, userDB.getUser(user.getUserName()));\n+    }\n+\n+    @Test\n+    public void testAuthenticate() {\n+        assertEquals(true, userDB.authenticate(\"JohnWick\", \"MyNameIsJohnWick333\"));\n+    }\n+\n+    @Test\n+    public void testGetUser() {\n+\n+        assertEquals(user, userDB.getUser(user.getUserName()));","path":"gergely.szebenyi/1-homework-beanvalidation/1-homework-beanvalidation-gergelyszebenyi/src/test/java/com/gergelyszebenyi/homework/beanvalidation/db/UserDBTest.java","position":69,"original_position":69,"commit_id":"41a2b129b735eb154e261067a56e804218260631","original_commit_id":"41a2b129b735eb154e261067a56e804218260631","user":{"login":"deneslaszlo","id":16327999,"avatar_url":"https://avatars.githubusercontent.com/u/16327999?v=3","gravatar_id":"","url":"https://api.github.com/users/deneslaszlo","html_url":"https://github.com/deneslaszlo","followers_url":"https://api.github.com/users/deneslaszlo/followers","following_url":"https://api.github.com/users/deneslaszlo/following{/other_user}","gists_url":"https://api.github.com/users/deneslaszlo/gists{/gist_id}","starred_url":"https://api.github.com/users/deneslaszlo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deneslaszlo/subscriptions","organizations_url":"https://api.github.com/users/deneslaszlo/orgs","repos_url":"https://api.github.com/users/deneslaszlo/repos","events_url":"https://api.github.com/users/deneslaszlo/events{/privacy}","received_events_url":"https://api.github.com/users/deneslaszlo/received_events","type":"User","site_admin":false},"body":"fordítva kell megadni, az első paraméter az expected (amire számítasz), a második az actual (ami tényleg kijött)\r\n","created_at":"2016-07-27T20:31:20Z","updated_at":"2016-07-27T20:31:20Z","html_url":"https://github.com/codingmentor/homeworks/pull/27#discussion_r72517253","pull_request_url":"https://api.github.com/repos/codingmentor/homeworks/pulls/27","_links":{"self":{"href":"https://api.github.com/repos/codingmentor/homeworks/pulls/comments/72517253"},"html":{"href":"https://github.com/codingmentor/homeworks/pull/27#discussion_r72517253"},"pull_request":{"href":"https://api.github.com/repos/codingmentor/homeworks/pulls/27"}}},"pull_request":{"url":"https://api.github.com/repos/codingmentor/homeworks/pulls/27","id":79072809,"html_url":"https://github.com/codingmentor/homeworks/pull/27","diff_url":"https://github.com/codingmentor/homeworks/pull/27.diff","patch_url":"https://github.com/codingmentor/homeworks/pull/27.patch","issue_url":"https://api.github.com/repos/codingmentor/homeworks/issues/27","number":27,"state":"open","locked":false,"title":"Szebenyi Gergely EE-1-beanvalidation","user":{"login":"prekogdevs","id":17639500,"avatar_url":"https://avatars.githubusercontent.com/u/17639500?v=3","gravatar_id":"","url":"https://api.github.com/users/prekogdevs","html_url":"https://github.com/prekogdevs","followers_url":"https://api.github.com/users/prekogdevs/followers","following_url":"https://api.github.com/users/prekogdevs/following{/other_user}","gists_url":"https://api.github.com/users/prekogdevs/gists{/gist_id}","starred_url":"https://api.github.com/users/prekogdevs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prekogdevs/subscriptions","organizations_url":"https://api.github.com/users/prekogdevs/orgs","repos_url":"https://api.github.com/users/prekogdevs/repos","events_url":"https://api.github.com/users/prekogdevs/events{/privacy}","received_events_url":"https://api.github.com/users/prekogdevs/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-07-27T18:22:24Z","updated_at":"2016-07-27T20:31:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"94f587f510ab6645c9c1f23b40365e759b6ec5ee","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/codingmentor/homeworks/pulls/27/commits","review_comments_url":"https://api.github.com/repos/codingmentor/homeworks/pulls/27/comments","review_comment_url":"https://api.github.com/repos/codingmentor/homeworks/pulls/comments{/number}","comments_url":"https://api.github.com/repos/codingmentor/homeworks/issues/27/comments","statuses_url":"https://api.github.com/repos/codingmentor/homeworks/statuses/41a2b129b735eb154e261067a56e804218260631","head":{"label":"prekogdevs:EE-1","ref":"EE-1","sha":"41a2b129b735eb154e261067a56e804218260631","user":{"login":"prekogdevs","id":17639500,"avatar_url":"https://avatars.githubusercontent.com/u/17639500?v=3","gravatar_id":"","url":"https://api.github.com/users/prekogdevs","html_url":"https://github.com/prekogdevs","followers_url":"https://api.github.com/users/prekogdevs/followers","following_url":"https://api.github.com/users/prekogdevs/following{/other_user}","gists_url":"https://api.github.com/users/prekogdevs/gists{/gist_id}","starred_url":"https://api.github.com/users/prekogdevs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prekogdevs/subscriptions","organizations_url":"https://api.github.com/users/prekogdevs/orgs","repos_url":"https://api.github.com/users/prekogdevs/repos","events_url":"https://api.github.com/users/prekogdevs/events{/privacy}","received_events_url":"https://api.github.com/users/prekogdevs/received_events","type":"User","site_admin":false},"repo":{"id":63486498,"name":"homeworks","full_name":"prekogdevs/homeworks","owner":{"login":"prekogdevs","id":17639500,"avatar_url":"https://avatars.githubusercontent.com/u/17639500?v=3","gravatar_id":"","url":"https://api.github.com/users/prekogdevs","html_url":"https://github.com/prekogdevs","followers_url":"https://api.github.com/users/prekogdevs/followers","following_url":"https://api.github.com/users/prekogdevs/following{/other_user}","gists_url":"https://api.github.com/users/prekogdevs/gists{/gist_id}","starred_url":"https://api.github.com/users/prekogdevs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prekogdevs/subscriptions","organizations_url":"https://api.github.com/users/prekogdevs/orgs","repos_url":"https://api.github.com/users/prekogdevs/repos","events_url":"https://api.github.com/users/prekogdevs/events{/privacy}","received_events_url":"https://api.github.com/users/prekogdevs/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/prekogdevs/homeworks","description":"Homeworks of codingmentor training","fork":true,"url":"https://api.github.com/repos/prekogdevs/homeworks","forks_url":"https://api.github.com/repos/prekogdevs/homeworks/forks","keys_url":"https://api.github.com/repos/prekogdevs/homeworks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prekogdevs/homeworks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prekogdevs/homeworks/teams","hooks_url":"https://api.github.com/repos/prekogdevs/homeworks/hooks","issue_events_url":"https://api.github.com/repos/prekogdevs/homeworks/issues/events{/number}","events_url":"https://api.github.com/repos/prekogdevs/homeworks/events","assignees_url":"https://api.github.com/repos/prekogdevs/homeworks/assignees{/user}","branches_url":"https://api.github.com/repos/prekogdevs/homeworks/branches{/branch}","tags_url":"https://api.github.com/repos/prekogdevs/homeworks/tags","blobs_url":"https://api.github.com/repos/prekogdevs/homeworks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prekogdevs/homeworks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prekogdevs/homeworks/git/refs{/sha}","trees_url":"https://api.github.com/repos/prekogdevs/homeworks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prekogdevs/homeworks/statuses/{sha}","languages_url":"https://api.github.com/repos/prekogdevs/homeworks/languages","stargazers_url":"https://api.github.com/repos/prekogdevs/homeworks/stargazers","contributors_url":"https://api.github.com/repos/prekogdevs/homeworks/contributors","subscribers_url":"https://api.github.com/repos/prekogdevs/homeworks/subscribers","subscription_url":"https://api.github.com/repos/prekogdevs/homeworks/subscription","commits_url":"https://api.github.com/repos/prekogdevs/homeworks/commits{/sha}","git_commits_url":"https://api.github.com/repos/prekogdevs/homeworks/git/commits{/sha}","comments_url":"https://api.github.com/repos/prekogdevs/homeworks/comments{/number}","issue_comment_url":"https://api.github.com/repos/prekogdevs/homeworks/issues/comments{/number}","contents_url":"https://api.github.com/repos/prekogdevs/homeworks/contents/{+path}","compare_url":"https://api.github.com/repos/prekogdevs/homeworks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prekogdevs/homeworks/merges","archive_url":"https://api.github.com/repos/prekogdevs/homeworks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prekogdevs/homeworks/downloads","issues_url":"https://api.github.com/repos/prekogdevs/homeworks/issues{/number}","pulls_url":"https://api.github.com/repos/prekogdevs/homeworks/pulls{/number}","milestones_url":"https://api.github.com/repos/prekogdevs/homeworks/milestones{/number}","notifications_url":"https://api.github.com/repos/prekogdevs/homeworks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prekogdevs/homeworks/labels{/name}","releases_url":"https://api.github.com/repos/prekogdevs/homeworks/releases{/id}","deployments_url":"https://api.github.com/repos/prekogdevs/homeworks/deployments","created_at":"2016-07-16T14:26:19Z","updated_at":"2016-07-16T14:00:02Z","pushed_at":"2016-07-25T23:03:27Z","git_url":"git://github.com/prekogdevs/homeworks.git","ssh_url":"git@github.com:prekogdevs/homeworks.git","clone_url":"https://github.com/prekogdevs/homeworks.git","svn_url":"https://github.com/prekogdevs/homeworks","homepage":null,"size":14,"stargazers_count":0,"watchers_count":0,"language":null,"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":"codingmentor:gergely.szebenyi","ref":"gergely.szebenyi","sha":"6cbc57a3afd4daa48959d05ab80229d4e7d838f7","user":{"login":"codingmentor","id":17640460,"avatar_url":"https://avatars.githubusercontent.com/u/17640460?v=3","gravatar_id":"","url":"https://api.github.com/users/codingmentor","html_url":"https://github.com/codingmentor","followers_url":"https://api.github.com/users/codingmentor/followers","following_url":"https://api.github.com/users/codingmentor/following{/other_user}","gists_url":"https://api.github.com/users/codingmentor/gists{/gist_id}","starred_url":"https://api.github.com/users/codingmentor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codingmentor/subscriptions","organizations_url":"https://api.github.com/users/codingmentor/orgs","repos_url":"https://api.github.com/users/codingmentor/repos","events_url":"https://api.github.com/users/codingmentor/events{/privacy}","received_events_url":"https://api.github.com/users/codingmentor/received_events","type":"Organization","site_admin":false},"repo":{"id":63485226,"name":"homeworks","full_name":"codingmentor/homeworks","owner":{"login":"codingmentor","id":17640460,"avatar_url":"https://avatars.githubusercontent.com/u/17640460?v=3","gravatar_id":"","url":"https://api.github.com/users/codingmentor","html_url":"https://github.com/codingmentor","followers_url":"https://api.github.com/users/codingmentor/followers","following_url":"https://api.github.com/users/codingmentor/following{/other_user}","gists_url":"https://api.github.com/users/codingmentor/gists{/gist_id}","starred_url":"https://api.github.com/users/codingmentor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codingmentor/subscriptions","organizations_url":"https://api.github.com/users/codingmentor/orgs","repos_url":"https://api.github.com/users/codingmentor/repos","events_url":"https://api.github.com/users/codingmentor/events{/privacy}","received_events_url":"https://api.github.com/users/codingmentor/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/codingmentor/homeworks","description":"Homeworks of codingmentor training","fork":false,"url":"https://api.github.com/repos/codingmentor/homeworks","forks_url":"https://api.github.com/repos/codingmentor/homeworks/forks","keys_url":"https://api.github.com/repos/codingmentor/homeworks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codingmentor/homeworks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codingmentor/homeworks/teams","hooks_url":"https://api.github.com/repos/codingmentor/homeworks/hooks","issue_events_url":"https://api.github.com/repos/codingmentor/homeworks/issues/events{/number}","events_url":"https://api.github.com/repos/codingmentor/homeworks/events","assignees_url":"https://api.github.com/repos/codingmentor/homeworks/assignees{/user}","branches_url":"https://api.github.com/repos/codingmentor/homeworks/branches{/branch}","tags_url":"https://api.github.com/repos/codingmentor/homeworks/tags","blobs_url":"https://api.github.com/repos/codingmentor/homeworks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codingmentor/homeworks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codingmentor/homeworks/git/refs{/sha}","trees_url":"https://api.github.com/repos/codingmentor/homeworks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codingmentor/homeworks/statuses/{sha}","languages_url":"https://api.github.com/repos/codingmentor/homeworks/languages","stargazers_url":"https://api.github.com/repos/codingmentor/homeworks/stargazers","contributors_url":"https://api.github.com/repos/codingmentor/homeworks/contributors","subscribers_url":"https://api.github.com/repos/codingmentor/homeworks/subscribers","subscription_url":"https://api.github.com/repos/codingmentor/homeworks/subscription","commits_url":"https://api.github.com/repos/codingmentor/homeworks/commits{/sha}","git_commits_url":"https://api.github.com/repos/codingmentor/homeworks/git/commits{/sha}","comments_url":"https://api.github.com/repos/codingmentor/homeworks/comments{/number}","issue_comment_url":"https://api.github.com/repos/codingmentor/homeworks/issues/comments{/number}","contents_url":"https://api.github.com/repos/codingmentor/homeworks/contents/{+path}","compare_url":"https://api.github.com/repos/codingmentor/homeworks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codingmentor/homeworks/merges","archive_url":"https://api.github.com/repos/codingmentor/homeworks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codingmentor/homeworks/downloads","issues_url":"https://api.github.com/repos/codingmentor/homeworks/issues{/number}","pulls_url":"https://api.github.com/repos/codingmentor/homeworks/pulls{/number}","milestones_url":"https://api.github.com/repos/codingmentor/homeworks/milestones{/number}","notifications_url":"https://api.github.com/repos/codingmentor/homeworks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codingmentor/homeworks/labels{/name}","releases_url":"https://api.github.com/repos/codingmentor/homeworks/releases{/id}","deployments_url":"https://api.github.com/repos/codingmentor/homeworks/deployments","created_at":"2016-07-16T13:54:09Z","updated_at":"2016-07-20T09:49:44Z","pushed_at":"2016-07-27T20:26:34Z","git_url":"git://github.com/codingmentor/homeworks.git","ssh_url":"git@github.com:codingmentor/homeworks.git","clone_url":"https://github.com/codingmentor/homeworks.git","svn_url":"https://github.com/codingmentor/homeworks","homepage":null,"size":317,"stargazers_count":1,"watchers_count":1,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":3,"forks":12,"open_issues":3,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/codingmentor/homeworks/pulls/27"},"html":{"href":"https://github.com/codingmentor/homeworks/pull/27"},"issue":{"href":"https://api.github.com/repos/codingmentor/homeworks/issues/27"},"comments":{"href":"https://api.github.com/repos/codingmentor/homeworks/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/codingmentor/homeworks/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/codingmentor/homeworks/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/codingmentor/homeworks/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/codingmentor/homeworks/statuses/41a2b129b735eb154e261067a56e804218260631"}}}}
{"actor":{"display_login":"deneslaszlo"}}