{"action":"created","comment":{"url":"https://api.github.com/repos/myStrength/CorinneTest/pulls/comments/192176103","pull_request_review_id":124897592,"id":192176103,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MjE3NjEwMw==","diff_hunk":"@@ -0,0 +1,158 @@\n+﻿using System;\n+using System.Collections.Generic;\n+\n+namespace CorinneTest\n+{\n+    class Factory : IPersonFactory\n+    {\n+       \n+        static Random rnd = new Random();\n+\n+\n+        public static List<Person> CreateInRange(int lowAge,\n+                                                 int highAge,\n+                                                 int? numOfPeople)\n+        {\n+            var list = new List<Person>();\n+            int i = 0;\n+            while (i < numOfPeople)\n+            {\n+                int type = rnd.Next(1, 9);\n+                if (type == 1) { Person newPerson = MakeWoman(lowAge, highAge); }\n+                else if (type == 2) { Person newPerson = MakeSomeone(lowAge, highAge); }\n+                else if (type == 3) { Person newPerson = MakeMan(lowAge, highAge); }\n+                else if (type == 4) { Person newPerson = MakeGirl(lowAge, highAge); }\n+                else if (type == 5) { Person newPerson = MakeBoy(lowAge, highAge); }\n+                else if (type == 6) { Person newPerson = MakeChild(lowAge, highAge); }\n+                else if (type == 7) { Person newPerson = MakeSeniorWoman(lowAge, highAge); }\n+                else if (type == 8) { Person newPerson = MakeSeniorMan(lowAge, highAge); }\n+                else if (type == 9) { Person newPerson = MakeSeniorPerson(lowAge, highAge); }\n+                list.Add(newPerson);\n+            }\n+                \n+            return list;\n+        }\n+\n+        public static DateTime? GenRanAdultBirthDate(int lowAge, int highAge)\n+        {\n+            if (highAge < 18)\n+                return null;\n+            DateTime start = new DateTime((2018 - highAge), 5, 29);\n+            DateTime minDate = new DateTime((2018 - lowAge), 5, 29);\n+            int range = (minDate - start).Days;\n+            return start.AddDays(rnd.Next(range));\n+        }\n+\n+        public static DateTime? GenRanChildBirthDate(int lowAge, int highAge)\n+        {\n+            if (lowAge >= 18) { return null; }\n+            if (highAge < 18) { DateTime maxDate = new DateTime((2018 - highAge), 5, 29); }\n+            else { DateTime maxDate = new DateTime(2000, 5, 29); }\n+            int range = (DateTime.Today-maxDate).Days;\n+            return DateTime.Today.AddDays(rnd.Next(range));\n+        }\n+\n+        public static DateTime? GenRanSeniorBirthDate(int lowAge, int highAge)\n+        {\n+            if (highAge < 6) { return null; }\n+            if (lowAge > 65) { DateTime minDate = new DateTime((2018 - lowAge), 5, 29);}\n+            else { DateTime minDate = new DateTime(1953, 5, 29); }\n+            DateTime start = new DateTime((2018-highAge), 5, 29);\n+            int range = (minDate - start).Days;\n+            return start.AddDays(rnd.Next(range));\n+        }\n+\n+\n+        public static DateTime GenRanBirthDate(int lowAge, int highAge)\n+        {\n+            DateTime start = new DateTime((2018-highAge), 5, 29);\n+            DateTime minDate = new DateTime((2018 - lowAge), 5, 29);\n+            int range = (minDate - start).Days;\n+            return start.AddDays(rnd.Next(range));\n+        }\n+\n+        public static int? GenAdultAge(int highAge)\n+        {\n+            if (highAge < 28)\n+                return null;\n+            int age = rnd.Next(18, highAge);\n+            return age;\n+        }\n+\n+        public static int? GenChildAge(int lowAge)\n+        {\n+            if (lowAge >= 18)\n+                return null;\n+            int age = rnd.Next(lowAge, 18);\n+            return age;\n+        }\n+\n+        public static int? GenSeniorAge(int highAge)\n+        {\n+            if (highAge < 65)\n+                return null;\n+            int age = rnd.Next(65, highAge);\n+            return age;\n+        }\n+\n+        public static int GenAge(int lowAge, int highAge)\n+        {\n+            int age = rnd.Next(lowAge, highAge);\n+            return age;\n+        }\n+","path":"CorinneTest/Factory.cs","position":103,"original_position":103,"commit_id":"2d1bcee67c89ad5ea5b510d444067f58f4ce9caa","original_commit_id":"2d1bcee67c89ad5ea5b510d444067f58f4ce9caa","user":{"login":"gregoryfein","id":1797299,"node_id":"MDQ6VXNlcjE3OTcyOTk=","avatar_url":"https://avatars0.githubusercontent.com/u/1797299?v=4","gravatar_id":"","url":"https://api.github.com/users/gregoryfein","html_url":"https://github.com/gregoryfein","followers_url":"https://api.github.com/users/gregoryfein/followers","following_url":"https://api.github.com/users/gregoryfein/following{/other_user}","gists_url":"https://api.github.com/users/gregoryfein/gists{/gist_id}","starred_url":"https://api.github.com/users/gregoryfein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregoryfein/subscriptions","organizations_url":"https://api.github.com/users/gregoryfein/orgs","repos_url":"https://api.github.com/users/gregoryfein/repos","events_url":"https://api.github.com/users/gregoryfein/events{/privacy}","received_events_url":"https://api.github.com/users/gregoryfein/received_events","type":"User","site_admin":false},"body":"maybe make #region #endregion for similar methods (like all GenAge stuff in a region)?","created_at":"2018-05-31T17:26:55Z","updated_at":"2018-05-31T17:30:22Z","html_url":"https://github.com/myStrength/CorinneTest/pull/1#discussion_r192176103","pull_request_url":"https://api.github.com/repos/myStrength/CorinneTest/pulls/1","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/myStrength/CorinneTest/pulls/comments/192176103"},"html":{"href":"https://github.com/myStrength/CorinneTest/pull/1#discussion_r192176103"},"pull_request":{"href":"https://api.github.com/repos/myStrength/CorinneTest/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/myStrength/CorinneTest/pulls/1","id":191819028,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkxODE5MDI4","html_url":"https://github.com/myStrength/CorinneTest/pull/1","diff_url":"https://github.com/myStrength/CorinneTest/pull/1.diff","patch_url":"https://github.com/myStrength/CorinneTest/pull/1.patch","issue_url":"https://api.github.com/repos/myStrength/CorinneTest/issues/1","number":1,"state":"open","locked":false,"title":"Feature/core","user":{"login":"cbintz","id":39742007,"node_id":"MDQ6VXNlcjM5NzQyMDA3","avatar_url":"https://avatars1.githubusercontent.com/u/39742007?v=4","gravatar_id":"","url":"https://api.github.com/users/cbintz","html_url":"https://github.com/cbintz","followers_url":"https://api.github.com/users/cbintz/followers","following_url":"https://api.github.com/users/cbintz/following{/other_user}","gists_url":"https://api.github.com/users/cbintz/gists{/gist_id}","starred_url":"https://api.github.com/users/cbintz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbintz/subscriptions","organizations_url":"https://api.github.com/users/cbintz/orgs","repos_url":"https://api.github.com/users/cbintz/repos","events_url":"https://api.github.com/users/cbintz/events{/privacy}","received_events_url":"https://api.github.com/users/cbintz/received_events","type":"User","site_admin":false},"body":"As the start of my test project, I created a POJO person class, made a singleton person list object, and started to work on the person factory. ","created_at":"2018-05-31T17:12:54Z","updated_at":"2018-05-31T17:30:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cbdef402307b5883d7e8c0b61a824af47e820c4e","assignee":{"login":"gregoryfein","id":1797299,"node_id":"MDQ6VXNlcjE3OTcyOTk=","avatar_url":"https://avatars0.githubusercontent.com/u/1797299?v=4","gravatar_id":"","url":"https://api.github.com/users/gregoryfein","html_url":"https://github.com/gregoryfein","followers_url":"https://api.github.com/users/gregoryfein/followers","following_url":"https://api.github.com/users/gregoryfein/following{/other_user}","gists_url":"https://api.github.com/users/gregoryfein/gists{/gist_id}","starred_url":"https://api.github.com/users/gregoryfein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregoryfein/subscriptions","organizations_url":"https://api.github.com/users/gregoryfein/orgs","repos_url":"https://api.github.com/users/gregoryfein/repos","events_url":"https://api.github.com/users/gregoryfein/events{/privacy}","received_events_url":"https://api.github.com/users/gregoryfein/received_events","type":"User","site_admin":false},"assignees":[{"login":"gregoryfein","id":1797299,"node_id":"MDQ6VXNlcjE3OTcyOTk=","avatar_url":"https://avatars0.githubusercontent.com/u/1797299?v=4","gravatar_id":"","url":"https://api.github.com/users/gregoryfein","html_url":"https://github.com/gregoryfein","followers_url":"https://api.github.com/users/gregoryfein/followers","following_url":"https://api.github.com/users/gregoryfein/following{/other_user}","gists_url":"https://api.github.com/users/gregoryfein/gists{/gist_id}","starred_url":"https://api.github.com/users/gregoryfein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregoryfein/subscriptions","organizations_url":"https://api.github.com/users/gregoryfein/orgs","repos_url":"https://api.github.com/users/gregoryfein/repos","events_url":"https://api.github.com/users/gregoryfein/events{/privacy}","received_events_url":"https://api.github.com/users/gregoryfein/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/myStrength/CorinneTest/pulls/1/commits","review_comments_url":"https://api.github.com/repos/myStrength/CorinneTest/pulls/1/comments","review_comment_url":"https://api.github.com/repos/myStrength/CorinneTest/pulls/comments{/number}","comments_url":"https://api.github.com/repos/myStrength/CorinneTest/issues/1/comments","statuses_url":"https://api.github.com/repos/myStrength/CorinneTest/statuses/2d1bcee67c89ad5ea5b510d444067f58f4ce9caa","head":{"label":"myStrength:feature/core","ref":"feature/core","sha":"2d1bcee67c89ad5ea5b510d444067f58f4ce9caa","user":{"login":"myStrength","id":8784545,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg3ODQ1NDU=","avatar_url":"https://avatars0.githubusercontent.com/u/8784545?v=4","gravatar_id":"","url":"https://api.github.com/users/myStrength","html_url":"https://github.com/myStrength","followers_url":"https://api.github.com/users/myStrength/followers","following_url":"https://api.github.com/users/myStrength/following{/other_user}","gists_url":"https://api.github.com/users/myStrength/gists{/gist_id}","starred_url":"https://api.github.com/users/myStrength/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myStrength/subscriptions","organizations_url":"https://api.github.com/users/myStrength/orgs","repos_url":"https://api.github.com/users/myStrength/repos","events_url":"https://api.github.com/users/myStrength/events{/privacy}","received_events_url":"https://api.github.com/users/myStrength/received_events","type":"Organization","site_admin":false},"repo":{"id":135489274,"node_id":"MDEwOlJlcG9zaXRvcnkxMzU0ODkyNzQ=","name":"CorinneTest","full_name":"myStrength/CorinneTest","owner":{"login":"myStrength","id":8784545,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg3ODQ1NDU=","avatar_url":"https://avatars0.githubusercontent.com/u/8784545?v=4","gravatar_id":"","url":"https://api.github.com/users/myStrength","html_url":"https://github.com/myStrength","followers_url":"https://api.github.com/users/myStrength/followers","following_url":"https://api.github.com/users/myStrength/following{/other_user}","gists_url":"https://api.github.com/users/myStrength/gists{/gist_id}","starred_url":"https://api.github.com/users/myStrength/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myStrength/subscriptions","organizations_url":"https://api.github.com/users/myStrength/orgs","repos_url":"https://api.github.com/users/myStrength/repos","events_url":"https://api.github.com/users/myStrength/events{/privacy}","received_events_url":"https://api.github.com/users/myStrength/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/myStrength/CorinneTest","description":null,"fork":false,"url":"https://api.github.com/repos/myStrength/CorinneTest","forks_url":"https://api.github.com/repos/myStrength/CorinneTest/forks","keys_url":"https://api.github.com/repos/myStrength/CorinneTest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/myStrength/CorinneTest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/myStrength/CorinneTest/teams","hooks_url":"https://api.github.com/repos/myStrength/CorinneTest/hooks","issue_events_url":"https://api.github.com/repos/myStrength/CorinneTest/issues/events{/number}","events_url":"https://api.github.com/repos/myStrength/CorinneTest/events","assignees_url":"https://api.github.com/repos/myStrength/CorinneTest/assignees{/user}","branches_url":"https://api.github.com/repos/myStrength/CorinneTest/branches{/branch}","tags_url":"https://api.github.com/repos/myStrength/CorinneTest/tags","blobs_url":"https://api.github.com/repos/myStrength/CorinneTest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/myStrength/CorinneTest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/myStrength/CorinneTest/git/refs{/sha}","trees_url":"https://api.github.com/repos/myStrength/CorinneTest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/myStrength/CorinneTest/statuses/{sha}","languages_url":"https://api.github.com/repos/myStrength/CorinneTest/languages","stargazers_url":"https://api.github.com/repos/myStrength/CorinneTest/stargazers","contributors_url":"https://api.github.com/repos/myStrength/CorinneTest/contributors","subscribers_url":"https://api.github.com/repos/myStrength/CorinneTest/subscribers","subscription_url":"https://api.github.com/repos/myStrength/CorinneTest/subscription","commits_url":"https://api.github.com/repos/myStrength/CorinneTest/commits{/sha}","git_commits_url":"https://api.github.com/repos/myStrength/CorinneTest/git/commits{/sha}","comments_url":"https://api.github.com/repos/myStrength/CorinneTest/comments{/number}","issue_comment_url":"https://api.github.com/repos/myStrength/CorinneTest/issues/comments{/number}","contents_url":"https://api.github.com/repos/myStrength/CorinneTest/contents/{+path}","compare_url":"https://api.github.com/repos/myStrength/CorinneTest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/myStrength/CorinneTest/merges","archive_url":"https://api.github.com/repos/myStrength/CorinneTest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/myStrength/CorinneTest/downloads","issues_url":"https://api.github.com/repos/myStrength/CorinneTest/issues{/number}","pulls_url":"https://api.github.com/repos/myStrength/CorinneTest/pulls{/number}","milestones_url":"https://api.github.com/repos/myStrength/CorinneTest/milestones{/number}","notifications_url":"https://api.github.com/repos/myStrength/CorinneTest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/myStrength/CorinneTest/labels{/name}","releases_url":"https://api.github.com/repos/myStrength/CorinneTest/releases{/id}","deployments_url":"https://api.github.com/repos/myStrength/CorinneTest/deployments","created_at":"2018-05-30T19:37:40Z","updated_at":"2018-05-31T17:09:43Z","pushed_at":"2018-05-31T17:12:55Z","git_url":"git://github.com/myStrength/CorinneTest.git","ssh_url":"git@github.com:myStrength/CorinneTest.git","clone_url":"https://github.com/myStrength/CorinneTest.git","svn_url":"https://github.com/myStrength/CorinneTest","homepage":null,"size":40,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"myStrength:develop","ref":"develop","sha":"68b4d7fe7446f6cf6bd1fd62eb3113a147b3d804","user":{"login":"myStrength","id":8784545,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg3ODQ1NDU=","avatar_url":"https://avatars0.githubusercontent.com/u/8784545?v=4","gravatar_id":"","url":"https://api.github.com/users/myStrength","html_url":"https://github.com/myStrength","followers_url":"https://api.github.com/users/myStrength/followers","following_url":"https://api.github.com/users/myStrength/following{/other_user}","gists_url":"https://api.github.com/users/myStrength/gists{/gist_id}","starred_url":"https://api.github.com/users/myStrength/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myStrength/subscriptions","organizations_url":"https://api.github.com/users/myStrength/orgs","repos_url":"https://api.github.com/users/myStrength/repos","events_url":"https://api.github.com/users/myStrength/events{/privacy}","received_events_url":"https://api.github.com/users/myStrength/received_events","type":"Organization","site_admin":false},"repo":{"id":135489274,"node_id":"MDEwOlJlcG9zaXRvcnkxMzU0ODkyNzQ=","name":"CorinneTest","full_name":"myStrength/CorinneTest","owner":{"login":"myStrength","id":8784545,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg3ODQ1NDU=","avatar_url":"https://avatars0.githubusercontent.com/u/8784545?v=4","gravatar_id":"","url":"https://api.github.com/users/myStrength","html_url":"https://github.com/myStrength","followers_url":"https://api.github.com/users/myStrength/followers","following_url":"https://api.github.com/users/myStrength/following{/other_user}","gists_url":"https://api.github.com/users/myStrength/gists{/gist_id}","starred_url":"https://api.github.com/users/myStrength/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myStrength/subscriptions","organizations_url":"https://api.github.com/users/myStrength/orgs","repos_url":"https://api.github.com/users/myStrength/repos","events_url":"https://api.github.com/users/myStrength/events{/privacy}","received_events_url":"https://api.github.com/users/myStrength/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/myStrength/CorinneTest","description":null,"fork":false,"url":"https://api.github.com/repos/myStrength/CorinneTest","forks_url":"https://api.github.com/repos/myStrength/CorinneTest/forks","keys_url":"https://api.github.com/repos/myStrength/CorinneTest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/myStrength/CorinneTest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/myStrength/CorinneTest/teams","hooks_url":"https://api.github.com/repos/myStrength/CorinneTest/hooks","issue_events_url":"https://api.github.com/repos/myStrength/CorinneTest/issues/events{/number}","events_url":"https://api.github.com/repos/myStrength/CorinneTest/events","assignees_url":"https://api.github.com/repos/myStrength/CorinneTest/assignees{/user}","branches_url":"https://api.github.com/repos/myStrength/CorinneTest/branches{/branch}","tags_url":"https://api.github.com/repos/myStrength/CorinneTest/tags","blobs_url":"https://api.github.com/repos/myStrength/CorinneTest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/myStrength/CorinneTest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/myStrength/CorinneTest/git/refs{/sha}","trees_url":"https://api.github.com/repos/myStrength/CorinneTest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/myStrength/CorinneTest/statuses/{sha}","languages_url":"https://api.github.com/repos/myStrength/CorinneTest/languages","stargazers_url":"https://api.github.com/repos/myStrength/CorinneTest/stargazers","contributors_url":"https://api.github.com/repos/myStrength/CorinneTest/contributors","subscribers_url":"https://api.github.com/repos/myStrength/CorinneTest/subscribers","subscription_url":"https://api.github.com/repos/myStrength/CorinneTest/subscription","commits_url":"https://api.github.com/repos/myStrength/CorinneTest/commits{/sha}","git_commits_url":"https://api.github.com/repos/myStrength/CorinneTest/git/commits{/sha}","comments_url":"https://api.github.com/repos/myStrength/CorinneTest/comments{/number}","issue_comment_url":"https://api.github.com/repos/myStrength/CorinneTest/issues/comments{/number}","contents_url":"https://api.github.com/repos/myStrength/CorinneTest/contents/{+path}","compare_url":"https://api.github.com/repos/myStrength/CorinneTest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/myStrength/CorinneTest/merges","archive_url":"https://api.github.com/repos/myStrength/CorinneTest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/myStrength/CorinneTest/downloads","issues_url":"https://api.github.com/repos/myStrength/CorinneTest/issues{/number}","pulls_url":"https://api.github.com/repos/myStrength/CorinneTest/pulls{/number}","milestones_url":"https://api.github.com/repos/myStrength/CorinneTest/milestones{/number}","notifications_url":"https://api.github.com/repos/myStrength/CorinneTest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/myStrength/CorinneTest/labels{/name}","releases_url":"https://api.github.com/repos/myStrength/CorinneTest/releases{/id}","deployments_url":"https://api.github.com/repos/myStrength/CorinneTest/deployments","created_at":"2018-05-30T19:37:40Z","updated_at":"2018-05-31T17:09:43Z","pushed_at":"2018-05-31T17:12:55Z","git_url":"git://github.com/myStrength/CorinneTest.git","ssh_url":"git@github.com:myStrength/CorinneTest.git","clone_url":"https://github.com/myStrength/CorinneTest.git","svn_url":"https://github.com/myStrength/CorinneTest","homepage":null,"size":40,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/myStrength/CorinneTest/pulls/1"},"html":{"href":"https://github.com/myStrength/CorinneTest/pull/1"},"issue":{"href":"https://api.github.com/repos/myStrength/CorinneTest/issues/1"},"comments":{"href":"https://api.github.com/repos/myStrength/CorinneTest/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/myStrength/CorinneTest/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/myStrength/CorinneTest/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/myStrength/CorinneTest/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/myStrength/CorinneTest/statuses/2d1bcee67c89ad5ea5b510d444067f58f4ce9caa"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"gregoryfein"}}