{"action":"created","comment":{"url":"https://api.github.com/repos/reactiveui/website/pulls/comments/238788178","pull_request_review_id":181416722,"id":238788178,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzODc4ODE3OA==","diff_hunk":"@@ -1,28 +1,108 @@\n-# Testing\n-\n-ReactiveUI includes a few tools to help testing, building on what Rx already includes (see [introtorx](http://www.introtorx.com/content/v1.0.10621.0/16_TestingRx.html)) for details.\n-\n-The utilities are included in the ReactiveUI.Testing nuget package.\n+ReactiveUI includes a few tools to help testing, built on what Reactive Extensions for .NET already include. The utilities are included in the `ReactiveUI.Testing` NuGet package. Make sure to install it into your unit tests project.\n \n ## Custom Scheduler\n \n-A common pattern is to replace the schedulers ReactiveUI is using to test execution is occuring without injecting schedulers everywhere. This can be achieved in a couple of ways\n+> Scheduling, and therefore threading, is generally avoided in test scenarios as it can introduce race conditions which may lead to non-deterministic tests — [Intro to Rx: Testing Rx](http://introtorx.com/Content/v1.0.10621.0/16_TestingRx.html)\n+\n+By default, `ReactiveCommand` uses `RxApp.MainThreadScheduler` and `ObservableAsPropertyHelper` uses `CurrentThreadScheduler.Instance`, but you can easily override this behavior:\n \n-```csharp\n-using(TestUtils.WithScheduler(ImmediateScheduler.Instance))\n+```cs\n+// Inject custom schedulers into your view model.\n+public LoginViewModel(IScheduler customScheduler)","path":"input/docs/handbook/testing/index.md","position":19,"original_position":19,"commit_id":"df53bfc9a67962296f165ed39367edd8a27fee24","original_commit_id":"63781150357ed8b44711e45bff6abe28b2b4816e","user":{"login":"worldbeater","id":6759207,"node_id":"MDQ6VXNlcjY3NTkyMDc=","avatar_url":"https://avatars0.githubusercontent.com/u/6759207?v=4","gravatar_id":"","url":"https://api.github.com/users/worldbeater","html_url":"https://github.com/worldbeater","followers_url":"https://api.github.com/users/worldbeater/followers","following_url":"https://api.github.com/users/worldbeater/following{/other_user}","gists_url":"https://api.github.com/users/worldbeater/gists{/gist_id}","starred_url":"https://api.github.com/users/worldbeater/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/worldbeater/subscriptions","organizations_url":"https://api.github.com/users/worldbeater/orgs","repos_url":"https://api.github.com/users/worldbeater/repos","events_url":"https://api.github.com/users/worldbeater/events{/privacy}","received_events_url":"https://api.github.com/users/worldbeater/received_events","type":"User","site_admin":false},"body":"Do you mean:\r\n```cs\r\npublic LoginViewModel(IScheduler scheduler) {\r\n  scheduler = scheduler ?? Locator.Current.GetService<IScheduler>();\r\n}\r\n```\r\nOr fallback to default main thread scheduler:\r\n```cs\r\npublic LoginViewModel(IScheduler scheduler) {\r\n  scheduler = scheduler ?? RxApp.MainThreadScheduler;\r\n}\r\n```\r\nWhich option is better?","created_at":"2018-12-04T18:41:22Z","updated_at":"2018-12-04T18:41:23Z","html_url":"https://github.com/reactiveui/website/pull/232#discussion_r238788178","pull_request_url":"https://api.github.com/repos/reactiveui/website/pulls/232","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/reactiveui/website/pulls/comments/238788178"},"html":{"href":"https://github.com/reactiveui/website/pull/232#discussion_r238788178"},"pull_request":{"href":"https://api.github.com/repos/reactiveui/website/pulls/232"}},"in_reply_to_id":238684299},"pull_request":{"url":"https://api.github.com/repos/reactiveui/website/pulls/232","id":235826200,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM1ODI2MjAw","html_url":"https://github.com/reactiveui/website/pull/232","diff_url":"https://github.com/reactiveui/website/pull/232.diff","patch_url":"https://github.com/reactiveui/website/pull/232.patch","issue_url":"https://api.github.com/repos/reactiveui/website/issues/232","number":232,"state":"open","locked":false,"title":"Improve ReactiveUI.Testing docs","user":{"login":"worldbeater","id":6759207,"node_id":"MDQ6VXNlcjY3NTkyMDc=","avatar_url":"https://avatars0.githubusercontent.com/u/6759207?v=4","gravatar_id":"","url":"https://api.github.com/users/worldbeater","html_url":"https://github.com/worldbeater","followers_url":"https://api.github.com/users/worldbeater/followers","following_url":"https://api.github.com/users/worldbeater/following{/other_user}","gists_url":"https://api.github.com/users/worldbeater/gists{/gist_id}","starred_url":"https://api.github.com/users/worldbeater/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/worldbeater/subscriptions","organizations_url":"https://api.github.com/users/worldbeater/orgs","repos_url":"https://api.github.com/users/worldbeater/repos","events_url":"https://api.github.com/users/worldbeater/events{/privacy}","received_events_url":"https://api.github.com/users/worldbeater/received_events","type":"User","site_admin":false},"body":"Tried to improve `ReactiveUI.Testing` docs, added info on injecting schedulers, etc.","created_at":"2018-12-04T14:20:28Z","updated_at":"2018-12-04T18:41:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cda4317541584efba5f8013ead13b24d77dd217a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/reactiveui/website/pulls/232/commits","review_comments_url":"https://api.github.com/repos/reactiveui/website/pulls/232/comments","review_comment_url":"https://api.github.com/repos/reactiveui/website/pulls/comments{/number}","comments_url":"https://api.github.com/repos/reactiveui/website/issues/232/comments","statuses_url":"https://api.github.com/repos/reactiveui/website/statuses/df53bfc9a67962296f165ed39367edd8a27fee24","head":{"label":"reactiveui:improve-rx-testing-docs","ref":"improve-rx-testing-docs","sha":"df53bfc9a67962296f165ed39367edd8a27fee24","user":{"login":"reactiveui","id":2327577,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMjc1Nzc=","avatar_url":"https://avatars1.githubusercontent.com/u/2327577?v=4","gravatar_id":"","url":"https://api.github.com/users/reactiveui","html_url":"https://github.com/reactiveui","followers_url":"https://api.github.com/users/reactiveui/followers","following_url":"https://api.github.com/users/reactiveui/following{/other_user}","gists_url":"https://api.github.com/users/reactiveui/gists{/gist_id}","starred_url":"https://api.github.com/users/reactiveui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reactiveui/subscriptions","organizations_url":"https://api.github.com/users/reactiveui/orgs","repos_url":"https://api.github.com/users/reactiveui/repos","events_url":"https://api.github.com/users/reactiveui/events{/privacy}","received_events_url":"https://api.github.com/users/reactiveui/received_events","type":"Organization","site_admin":false},"repo":{"id":87236502,"node_id":"MDEwOlJlcG9zaXRvcnk4NzIzNjUwMg==","name":"website","full_name":"reactiveui/website","private":false,"owner":{"login":"reactiveui","id":2327577,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMjc1Nzc=","avatar_url":"https://avatars1.githubusercontent.com/u/2327577?v=4","gravatar_id":"","url":"https://api.github.com/users/reactiveui","html_url":"https://github.com/reactiveui","followers_url":"https://api.github.com/users/reactiveui/followers","following_url":"https://api.github.com/users/reactiveui/following{/other_user}","gists_url":"https://api.github.com/users/reactiveui/gists{/gist_id}","starred_url":"https://api.github.com/users/reactiveui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reactiveui/subscriptions","organizations_url":"https://api.github.com/users/reactiveui/orgs","repos_url":"https://api.github.com/users/reactiveui/repos","events_url":"https://api.github.com/users/reactiveui/events{/privacy}","received_events_url":"https://api.github.com/users/reactiveui/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/reactiveui/website","description":"Website of https://www.reactiveui.net/ - PR's welcome! <3","fork":false,"url":"https://api.github.com/repos/reactiveui/website","forks_url":"https://api.github.com/repos/reactiveui/website/forks","keys_url":"https://api.github.com/repos/reactiveui/website/keys{/key_id}","collaborators_url":"https://api.github.com/repos/reactiveui/website/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/reactiveui/website/teams","hooks_url":"https://api.github.com/repos/reactiveui/website/hooks","issue_events_url":"https://api.github.com/repos/reactiveui/website/issues/events{/number}","events_url":"https://api.github.com/repos/reactiveui/website/events","assignees_url":"https://api.github.com/repos/reactiveui/website/assignees{/user}","branches_url":"https://api.github.com/repos/reactiveui/website/branches{/branch}","tags_url":"https://api.github.com/repos/reactiveui/website/tags","blobs_url":"https://api.github.com/repos/reactiveui/website/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/reactiveui/website/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/reactiveui/website/git/refs{/sha}","trees_url":"https://api.github.com/repos/reactiveui/website/git/trees{/sha}","statuses_url":"https://api.github.com/repos/reactiveui/website/statuses/{sha}","languages_url":"https://api.github.com/repos/reactiveui/website/languages","stargazers_url":"https://api.github.com/repos/reactiveui/website/stargazers","contributors_url":"https://api.github.com/repos/reactiveui/website/contributors","subscribers_url":"https://api.github.com/repos/reactiveui/website/subscribers","subscription_url":"https://api.github.com/repos/reactiveui/website/subscription","commits_url":"https://api.github.com/repos/reactiveui/website/commits{/sha}","git_commits_url":"https://api.github.com/repos/reactiveui/website/git/commits{/sha}","comments_url":"https://api.github.com/repos/reactiveui/website/comments{/number}","issue_comment_url":"https://api.github.com/repos/reactiveui/website/issues/comments{/number}","contents_url":"https://api.github.com/repos/reactiveui/website/contents/{+path}","compare_url":"https://api.github.com/repos/reactiveui/website/compare/{base}...{head}","merges_url":"https://api.github.com/repos/reactiveui/website/merges","archive_url":"https://api.github.com/repos/reactiveui/website/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/reactiveui/website/downloads","issues_url":"https://api.github.com/repos/reactiveui/website/issues{/number}","pulls_url":"https://api.github.com/repos/reactiveui/website/pulls{/number}","milestones_url":"https://api.github.com/repos/reactiveui/website/milestones{/number}","notifications_url":"https://api.github.com/repos/reactiveui/website/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/reactiveui/website/labels{/name}","releases_url":"https://api.github.com/repos/reactiveui/website/releases{/id}","deployments_url":"https://api.github.com/repos/reactiveui/website/deployments","created_at":"2017-04-04T21:24:17Z","updated_at":"2018-12-04T17:15:59Z","pushed_at":"2018-12-04T17:19:59Z","git_url":"git://github.com/reactiveui/website.git","ssh_url":"git@github.com:reactiveui/website.git","clone_url":"https://github.com/reactiveui/website.git","svn_url":"https://github.com/reactiveui/website","homepage":"https://www.reactiveui.net/","size":22857,"stargazers_count":11,"watchers_count":11,"language":"HTML","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":63,"mirror_url":null,"archived":false,"open_issues_count":28,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":63,"open_issues":28,"watchers":11,"default_branch":"master"}},"base":{"label":"reactiveui:master","ref":"master","sha":"df7a4f6894065e77bc331cf57177a9e75b503d98","user":{"login":"reactiveui","id":2327577,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMjc1Nzc=","avatar_url":"https://avatars1.githubusercontent.com/u/2327577?v=4","gravatar_id":"","url":"https://api.github.com/users/reactiveui","html_url":"https://github.com/reactiveui","followers_url":"https://api.github.com/users/reactiveui/followers","following_url":"https://api.github.com/users/reactiveui/following{/other_user}","gists_url":"https://api.github.com/users/reactiveui/gists{/gist_id}","starred_url":"https://api.github.com/users/reactiveui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reactiveui/subscriptions","organizations_url":"https://api.github.com/users/reactiveui/orgs","repos_url":"https://api.github.com/users/reactiveui/repos","events_url":"https://api.github.com/users/reactiveui/events{/privacy}","received_events_url":"https://api.github.com/users/reactiveui/received_events","type":"Organization","site_admin":false},"repo":{"id":87236502,"node_id":"MDEwOlJlcG9zaXRvcnk4NzIzNjUwMg==","name":"website","full_name":"reactiveui/website","private":false,"owner":{"login":"reactiveui","id":2327577,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMjc1Nzc=","avatar_url":"https://avatars1.githubusercontent.com/u/2327577?v=4","gravatar_id":"","url":"https://api.github.com/users/reactiveui","html_url":"https://github.com/reactiveui","followers_url":"https://api.github.com/users/reactiveui/followers","following_url":"https://api.github.com/users/reactiveui/following{/other_user}","gists_url":"https://api.github.com/users/reactiveui/gists{/gist_id}","starred_url":"https://api.github.com/users/reactiveui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reactiveui/subscriptions","organizations_url":"https://api.github.com/users/reactiveui/orgs","repos_url":"https://api.github.com/users/reactiveui/repos","events_url":"https://api.github.com/users/reactiveui/events{/privacy}","received_events_url":"https://api.github.com/users/reactiveui/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/reactiveui/website","description":"Website of https://www.reactiveui.net/ - PR's welcome! <3","fork":false,"url":"https://api.github.com/repos/reactiveui/website","forks_url":"https://api.github.com/repos/reactiveui/website/forks","keys_url":"https://api.github.com/repos/reactiveui/website/keys{/key_id}","collaborators_url":"https://api.github.com/repos/reactiveui/website/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/reactiveui/website/teams","hooks_url":"https://api.github.com/repos/reactiveui/website/hooks","issue_events_url":"https://api.github.com/repos/reactiveui/website/issues/events{/number}","events_url":"https://api.github.com/repos/reactiveui/website/events","assignees_url":"https://api.github.com/repos/reactiveui/website/assignees{/user}","branches_url":"https://api.github.com/repos/reactiveui/website/branches{/branch}","tags_url":"https://api.github.com/repos/reactiveui/website/tags","blobs_url":"https://api.github.com/repos/reactiveui/website/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/reactiveui/website/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/reactiveui/website/git/refs{/sha}","trees_url":"https://api.github.com/repos/reactiveui/website/git/trees{/sha}","statuses_url":"https://api.github.com/repos/reactiveui/website/statuses/{sha}","languages_url":"https://api.github.com/repos/reactiveui/website/languages","stargazers_url":"https://api.github.com/repos/reactiveui/website/stargazers","contributors_url":"https://api.github.com/repos/reactiveui/website/contributors","subscribers_url":"https://api.github.com/repos/reactiveui/website/subscribers","subscription_url":"https://api.github.com/repos/reactiveui/website/subscription","commits_url":"https://api.github.com/repos/reactiveui/website/commits{/sha}","git_commits_url":"https://api.github.com/repos/reactiveui/website/git/commits{/sha}","comments_url":"https://api.github.com/repos/reactiveui/website/comments{/number}","issue_comment_url":"https://api.github.com/repos/reactiveui/website/issues/comments{/number}","contents_url":"https://api.github.com/repos/reactiveui/website/contents/{+path}","compare_url":"https://api.github.com/repos/reactiveui/website/compare/{base}...{head}","merges_url":"https://api.github.com/repos/reactiveui/website/merges","archive_url":"https://api.github.com/repos/reactiveui/website/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/reactiveui/website/downloads","issues_url":"https://api.github.com/repos/reactiveui/website/issues{/number}","pulls_url":"https://api.github.com/repos/reactiveui/website/pulls{/number}","milestones_url":"https://api.github.com/repos/reactiveui/website/milestones{/number}","notifications_url":"https://api.github.com/repos/reactiveui/website/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/reactiveui/website/labels{/name}","releases_url":"https://api.github.com/repos/reactiveui/website/releases{/id}","deployments_url":"https://api.github.com/repos/reactiveui/website/deployments","created_at":"2017-04-04T21:24:17Z","updated_at":"2018-12-04T17:15:59Z","pushed_at":"2018-12-04T17:19:59Z","git_url":"git://github.com/reactiveui/website.git","ssh_url":"git@github.com:reactiveui/website.git","clone_url":"https://github.com/reactiveui/website.git","svn_url":"https://github.com/reactiveui/website","homepage":"https://www.reactiveui.net/","size":22857,"stargazers_count":11,"watchers_count":11,"language":"HTML","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":63,"mirror_url":null,"archived":false,"open_issues_count":28,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":63,"open_issues":28,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/reactiveui/website/pulls/232"},"html":{"href":"https://github.com/reactiveui/website/pull/232"},"issue":{"href":"https://api.github.com/repos/reactiveui/website/issues/232"},"comments":{"href":"https://api.github.com/repos/reactiveui/website/issues/232/comments"},"review_comments":{"href":"https://api.github.com/repos/reactiveui/website/pulls/232/comments"},"review_comment":{"href":"https://api.github.com/repos/reactiveui/website/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/reactiveui/website/pulls/232/commits"},"statuses":{"href":"https://api.github.com/repos/reactiveui/website/statuses/df53bfc9a67962296f165ed39367edd8a27fee24"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"worldbeater"}}