{"action":"created","comment":{"url":"https://api.github.com/repos/acaxlabs/Carbon/pulls/comments/176854435","pull_request_review_id":106637689,"id":176854435,"diff_hunk":"@@ -1,63 +1,54 @@\n ﻿using Microsoft.VisualStudio.TestTools.UnitTesting;\r\n using Carbon.Net;\r\n-using System;\r\n-using System.Collections.Generic;\r\n-using System.Linq;\r\n-using System.Text;\r\n-using System.Threading.Tasks;\r\n \r\n-namespace Carbon.Net.Tests\r\n+namespace CarbonTests.Net\r\n {\r\n-    [TestClass()]\r\n+\t[TestClass]\r\n     public class ClientTests\r\n     {\r\n-        //Use https://www.mocky to build request to test\r\n-\r\n-        [TestMethod()]\r\n-        public void GetTest()\r\n+        [TestMethod]\r\n+\t\t[TestCategory(\"Smoke\")]\r\n+\t\t[TestCategory(\"Get\")]\r\n+        public void GetSendsValidGetRequest()\r\n         {\r\n-            try\r\n-            {\r\n-                var res = new Client().Get(\"http://www.mocky.io/v2/5ab444412f00006400ca3b31\");\r\n-                Assert.IsNotNull(res);\r\n-            }\r\n-            catch (Exception ex)\r\n-            {\r\n-\r\n-                Assert.Fail(ex.Message);\r\n-            }\r\n+\t\t\tvar res = new Client().Get(\"http://httpbin.org/get\");\r\n+\t\t\tAssert.IsNotNull(res);\r\n         }\r\n \r\n-        [TestMethod()]\r\n-        public void PostTest()\r\n+        [TestMethod]\r\n+\t\t[TestCategory(\"Smoke\")]\r\n+\t\t[TestCategory(\"Post\")]\r\n+        public void PostSendsValidPostRequest()\r\n         {\r\n-            try\r\n-            {\r\n-                var res = new Client().Post(\"http://www.mocky.io/v2/5ab444412f00006400ca3b31\", new { message = \"test\" });\r\n-                Assert.IsNotNull(res);\r\n-            }\r\n-            catch (Exception ex)\r\n-            {\r\n-\r\n-                Assert.Fail(ex.Message);\r\n-            }\r\n-        }\r\n-\r\n-        [TestMethod()]\r\n-        public void PutTest()\r\n+\t\t\tvar res = new Client().Post(\"http://httpbin.org/post\", new { message = \"test\" });\r\n+\t\t\tAssert.IsNotNull(res);\r\n+\t\t}\r\n+\r\n+\t\t[TestMethod]\r","path":"CarbonTests/Net/ClientTests.cs","position":64,"original_position":64,"commit_id":"c8eda43ae9a5b02527a0e85fd350cc3387cc1eaf","original_commit_id":"c8eda43ae9a5b02527a0e85fd350cc3387cc1eaf","user":{"login":"Phrohdoh","id":4861023,"avatar_url":"https://avatars2.githubusercontent.com/u/4861023?v=4","gravatar_id":"","url":"https://api.github.com/users/Phrohdoh","html_url":"https://github.com/Phrohdoh","followers_url":"https://api.github.com/users/Phrohdoh/followers","following_url":"https://api.github.com/users/Phrohdoh/following{/other_user}","gists_url":"https://api.github.com/users/Phrohdoh/gists{/gist_id}","starred_url":"https://api.github.com/users/Phrohdoh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Phrohdoh/subscriptions","organizations_url":"https://api.github.com/users/Phrohdoh/orgs","repos_url":"https://api.github.com/users/Phrohdoh/repos","events_url":"https://api.github.com/users/Phrohdoh/events{/privacy}","received_events_url":"https://api.github.com/users/Phrohdoh/received_events","type":"User","site_admin":false},"body":"Looks like a tab vs space (vs tabstop) issue?","created_at":"2018-03-23T20:25:28Z","updated_at":"2018-03-23T20:26:36Z","html_url":"https://github.com/acaxlabs/Carbon/pull/1#discussion_r176854435","pull_request_url":"https://api.github.com/repos/acaxlabs/Carbon/pulls/1","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/acaxlabs/Carbon/pulls/comments/176854435"},"html":{"href":"https://github.com/acaxlabs/Carbon/pull/1#discussion_r176854435"},"pull_request":{"href":"https://api.github.com/repos/acaxlabs/Carbon/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/acaxlabs/Carbon/pulls/1","id":177161993,"html_url":"https://github.com/acaxlabs/Carbon/pull/1","diff_url":"https://github.com/acaxlabs/Carbon/pull/1.diff","patch_url":"https://github.com/acaxlabs/Carbon/pull/1.patch","issue_url":"https://api.github.com/repos/acaxlabs/Carbon/issues/1","number":1,"state":"open","locked":false,"title":"Add clarity to client tests","user":{"login":"Deadairx","id":12243529,"avatar_url":"https://avatars1.githubusercontent.com/u/12243529?v=4","gravatar_id":"","url":"https://api.github.com/users/Deadairx","html_url":"https://github.com/Deadairx","followers_url":"https://api.github.com/users/Deadairx/followers","following_url":"https://api.github.com/users/Deadairx/following{/other_user}","gists_url":"https://api.github.com/users/Deadairx/gists{/gist_id}","starred_url":"https://api.github.com/users/Deadairx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Deadairx/subscriptions","organizations_url":"https://api.github.com/users/Deadairx/orgs","repos_url":"https://api.github.com/users/Deadairx/repos","events_url":"https://api.github.com/users/Deadairx/events{/privacy}","received_events_url":"https://api.github.com/users/Deadairx/received_events","type":"User","site_admin":false},"body":"- Removed `try`/`catch` from `ClientTests` as any exception will fail the test anyway.\r\n\r\n- Mocky is good for checking responses but doesn't validate the request. I switched these tests to use [httpbin](http://httpbin.org/) which can validate the request. (ex `http://httpbin.org/get` will only respond with `200 OK` to `GET` requests) It also repeats your request in the response so you can validate what was received by the server.\r\n\r\n- Added two more tests that validate the data is being sent when using `Post` and `Put`.\r\n\r\n- Also added some categories to the tests and gave them names that better describe their purpose.","created_at":"2018-03-23T19:17:30Z","updated_at":"2018-03-23T20:26:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4765096120fc28fe2b7ea6b5fe55d75d4707e265","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/acaxlabs/Carbon/pulls/1/commits","review_comments_url":"https://api.github.com/repos/acaxlabs/Carbon/pulls/1/comments","review_comment_url":"https://api.github.com/repos/acaxlabs/Carbon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/acaxlabs/Carbon/issues/1/comments","statuses_url":"https://api.github.com/repos/acaxlabs/Carbon/statuses/c8eda43ae9a5b02527a0e85fd350cc3387cc1eaf","head":{"label":"acaxlabs:ca/test/clientTests","ref":"ca/test/clientTests","sha":"c8eda43ae9a5b02527a0e85fd350cc3387cc1eaf","user":{"login":"acaxlabs","id":19840222,"avatar_url":"https://avatars0.githubusercontent.com/u/19840222?v=4","gravatar_id":"","url":"https://api.github.com/users/acaxlabs","html_url":"https://github.com/acaxlabs","followers_url":"https://api.github.com/users/acaxlabs/followers","following_url":"https://api.github.com/users/acaxlabs/following{/other_user}","gists_url":"https://api.github.com/users/acaxlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/acaxlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acaxlabs/subscriptions","organizations_url":"https://api.github.com/users/acaxlabs/orgs","repos_url":"https://api.github.com/users/acaxlabs/repos","events_url":"https://api.github.com/users/acaxlabs/events{/privacy}","received_events_url":"https://api.github.com/users/acaxlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":126404758,"name":"Carbon","full_name":"acaxlabs/Carbon","owner":{"login":"acaxlabs","id":19840222,"avatar_url":"https://avatars0.githubusercontent.com/u/19840222?v=4","gravatar_id":"","url":"https://api.github.com/users/acaxlabs","html_url":"https://github.com/acaxlabs","followers_url":"https://api.github.com/users/acaxlabs/followers","following_url":"https://api.github.com/users/acaxlabs/following{/other_user}","gists_url":"https://api.github.com/users/acaxlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/acaxlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acaxlabs/subscriptions","organizations_url":"https://api.github.com/users/acaxlabs/orgs","repos_url":"https://api.github.com/users/acaxlabs/repos","events_url":"https://api.github.com/users/acaxlabs/events{/privacy}","received_events_url":"https://api.github.com/users/acaxlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/acaxlabs/Carbon","description":"C# net utilities classes used across a bunch of projects","fork":false,"url":"https://api.github.com/repos/acaxlabs/Carbon","forks_url":"https://api.github.com/repos/acaxlabs/Carbon/forks","keys_url":"https://api.github.com/repos/acaxlabs/Carbon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/acaxlabs/Carbon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/acaxlabs/Carbon/teams","hooks_url":"https://api.github.com/repos/acaxlabs/Carbon/hooks","issue_events_url":"https://api.github.com/repos/acaxlabs/Carbon/issues/events{/number}","events_url":"https://api.github.com/repos/acaxlabs/Carbon/events","assignees_url":"https://api.github.com/repos/acaxlabs/Carbon/assignees{/user}","branches_url":"https://api.github.com/repos/acaxlabs/Carbon/branches{/branch}","tags_url":"https://api.github.com/repos/acaxlabs/Carbon/tags","blobs_url":"https://api.github.com/repos/acaxlabs/Carbon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/acaxlabs/Carbon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/acaxlabs/Carbon/git/refs{/sha}","trees_url":"https://api.github.com/repos/acaxlabs/Carbon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/acaxlabs/Carbon/statuses/{sha}","languages_url":"https://api.github.com/repos/acaxlabs/Carbon/languages","stargazers_url":"https://api.github.com/repos/acaxlabs/Carbon/stargazers","contributors_url":"https://api.github.com/repos/acaxlabs/Carbon/contributors","subscribers_url":"https://api.github.com/repos/acaxlabs/Carbon/subscribers","subscription_url":"https://api.github.com/repos/acaxlabs/Carbon/subscription","commits_url":"https://api.github.com/repos/acaxlabs/Carbon/commits{/sha}","git_commits_url":"https://api.github.com/repos/acaxlabs/Carbon/git/commits{/sha}","comments_url":"https://api.github.com/repos/acaxlabs/Carbon/comments{/number}","issue_comment_url":"https://api.github.com/repos/acaxlabs/Carbon/issues/comments{/number}","contents_url":"https://api.github.com/repos/acaxlabs/Carbon/contents/{+path}","compare_url":"https://api.github.com/repos/acaxlabs/Carbon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/acaxlabs/Carbon/merges","archive_url":"https://api.github.com/repos/acaxlabs/Carbon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/acaxlabs/Carbon/downloads","issues_url":"https://api.github.com/repos/acaxlabs/Carbon/issues{/number}","pulls_url":"https://api.github.com/repos/acaxlabs/Carbon/pulls{/number}","milestones_url":"https://api.github.com/repos/acaxlabs/Carbon/milestones{/number}","notifications_url":"https://api.github.com/repos/acaxlabs/Carbon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/acaxlabs/Carbon/labels{/name}","releases_url":"https://api.github.com/repos/acaxlabs/Carbon/releases{/id}","deployments_url":"https://api.github.com/repos/acaxlabs/Carbon/deployments","created_at":"2018-03-22T23:00:21Z","updated_at":"2018-03-23T00:24:13Z","pushed_at":"2018-03-23T19:17:31Z","git_url":"git://github.com/acaxlabs/Carbon.git","ssh_url":"git@github.com:acaxlabs/Carbon.git","clone_url":"https://github.com/acaxlabs/Carbon.git","svn_url":"https://github.com/acaxlabs/Carbon","homepage":null,"size":6638,"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":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"acaxlabs:master","ref":"master","sha":"2f5ffc803b9c37d5cca4a5e5af3af5fb11d86b6f","user":{"login":"acaxlabs","id":19840222,"avatar_url":"https://avatars0.githubusercontent.com/u/19840222?v=4","gravatar_id":"","url":"https://api.github.com/users/acaxlabs","html_url":"https://github.com/acaxlabs","followers_url":"https://api.github.com/users/acaxlabs/followers","following_url":"https://api.github.com/users/acaxlabs/following{/other_user}","gists_url":"https://api.github.com/users/acaxlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/acaxlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acaxlabs/subscriptions","organizations_url":"https://api.github.com/users/acaxlabs/orgs","repos_url":"https://api.github.com/users/acaxlabs/repos","events_url":"https://api.github.com/users/acaxlabs/events{/privacy}","received_events_url":"https://api.github.com/users/acaxlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":126404758,"name":"Carbon","full_name":"acaxlabs/Carbon","owner":{"login":"acaxlabs","id":19840222,"avatar_url":"https://avatars0.githubusercontent.com/u/19840222?v=4","gravatar_id":"","url":"https://api.github.com/users/acaxlabs","html_url":"https://github.com/acaxlabs","followers_url":"https://api.github.com/users/acaxlabs/followers","following_url":"https://api.github.com/users/acaxlabs/following{/other_user}","gists_url":"https://api.github.com/users/acaxlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/acaxlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acaxlabs/subscriptions","organizations_url":"https://api.github.com/users/acaxlabs/orgs","repos_url":"https://api.github.com/users/acaxlabs/repos","events_url":"https://api.github.com/users/acaxlabs/events{/privacy}","received_events_url":"https://api.github.com/users/acaxlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/acaxlabs/Carbon","description":"C# net utilities classes used across a bunch of projects","fork":false,"url":"https://api.github.com/repos/acaxlabs/Carbon","forks_url":"https://api.github.com/repos/acaxlabs/Carbon/forks","keys_url":"https://api.github.com/repos/acaxlabs/Carbon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/acaxlabs/Carbon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/acaxlabs/Carbon/teams","hooks_url":"https://api.github.com/repos/acaxlabs/Carbon/hooks","issue_events_url":"https://api.github.com/repos/acaxlabs/Carbon/issues/events{/number}","events_url":"https://api.github.com/repos/acaxlabs/Carbon/events","assignees_url":"https://api.github.com/repos/acaxlabs/Carbon/assignees{/user}","branches_url":"https://api.github.com/repos/acaxlabs/Carbon/branches{/branch}","tags_url":"https://api.github.com/repos/acaxlabs/Carbon/tags","blobs_url":"https://api.github.com/repos/acaxlabs/Carbon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/acaxlabs/Carbon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/acaxlabs/Carbon/git/refs{/sha}","trees_url":"https://api.github.com/repos/acaxlabs/Carbon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/acaxlabs/Carbon/statuses/{sha}","languages_url":"https://api.github.com/repos/acaxlabs/Carbon/languages","stargazers_url":"https://api.github.com/repos/acaxlabs/Carbon/stargazers","contributors_url":"https://api.github.com/repos/acaxlabs/Carbon/contributors","subscribers_url":"https://api.github.com/repos/acaxlabs/Carbon/subscribers","subscription_url":"https://api.github.com/repos/acaxlabs/Carbon/subscription","commits_url":"https://api.github.com/repos/acaxlabs/Carbon/commits{/sha}","git_commits_url":"https://api.github.com/repos/acaxlabs/Carbon/git/commits{/sha}","comments_url":"https://api.github.com/repos/acaxlabs/Carbon/comments{/number}","issue_comment_url":"https://api.github.com/repos/acaxlabs/Carbon/issues/comments{/number}","contents_url":"https://api.github.com/repos/acaxlabs/Carbon/contents/{+path}","compare_url":"https://api.github.com/repos/acaxlabs/Carbon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/acaxlabs/Carbon/merges","archive_url":"https://api.github.com/repos/acaxlabs/Carbon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/acaxlabs/Carbon/downloads","issues_url":"https://api.github.com/repos/acaxlabs/Carbon/issues{/number}","pulls_url":"https://api.github.com/repos/acaxlabs/Carbon/pulls{/number}","milestones_url":"https://api.github.com/repos/acaxlabs/Carbon/milestones{/number}","notifications_url":"https://api.github.com/repos/acaxlabs/Carbon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/acaxlabs/Carbon/labels{/name}","releases_url":"https://api.github.com/repos/acaxlabs/Carbon/releases{/id}","deployments_url":"https://api.github.com/repos/acaxlabs/Carbon/deployments","created_at":"2018-03-22T23:00:21Z","updated_at":"2018-03-23T00:24:13Z","pushed_at":"2018-03-23T19:17:31Z","git_url":"git://github.com/acaxlabs/Carbon.git","ssh_url":"git@github.com:acaxlabs/Carbon.git","clone_url":"https://github.com/acaxlabs/Carbon.git","svn_url":"https://github.com/acaxlabs/Carbon","homepage":null,"size":6638,"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":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/acaxlabs/Carbon/pulls/1"},"html":{"href":"https://github.com/acaxlabs/Carbon/pull/1"},"issue":{"href":"https://api.github.com/repos/acaxlabs/Carbon/issues/1"},"comments":{"href":"https://api.github.com/repos/acaxlabs/Carbon/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/acaxlabs/Carbon/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/acaxlabs/Carbon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/acaxlabs/Carbon/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/acaxlabs/Carbon/statuses/c8eda43ae9a5b02527a0e85fd350cc3387cc1eaf"}},"author_association":"NONE"}}
{"actor":{"display_login":"Phrohdoh"}}