{"action":"created","comment":{"url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/pulls/comments/37463591","id":37463591,"diff_hunk":"@@ -154,28 +154,28 @@ Multiplication_ShouldResultInAMultiplicationOfTwoPassedNumbers()\n }\n ```\n \n-As you can see, it looks like two methods that we previously had are gone now and the test is the only thing that is left. Well, to tell you the truth, they are not gone -- it is just that the framework handles these for us. Let's reiterate through the three elements of the previous version of the test that I promised would be there after the transition to xUnit framework:\n+It looks like two methods that we previously had are gone now and that the test is the only thing that's left. Well, to tell you the truth, they are not gone -- it's just that the framework handles these for us. Let's reiterate the three elements of the previous version of the test that I promised would be there after the transition to the test framework:\n \n-1.  **Test List** is now created automatically by the framework from all methods marked with a [Fact] attribute, so no need to maintain one or more central lists. Thus, the `Main()` method is gone.\n-2.  The **Test Method** is here and looks almost the same as the last time.\n-3.  The **Assertion** took the form of a call to static `Assert.Equal()` method -- the xUnit.NET framework is bundled with a wide range of pre-made assertions for your convenience. Of course, no one stops you from writing your own custom one if you do not find what you are looking for in a default set.\n+1.  The **Test List** is now created automatically by the framework from all methods marked with a [Fact] attribute. There's no need anymore to maintain one or more central lists and the `Main()` method has gone.\n+2.  The **Test Method** is present and looks almost the same as before.\n+3.  The **Assertion** takes the form of a call to the static `Assert.Equal()` method -- the xUnit.NET framework is bundled with a wide range of assertion methods. Of course, no one stops you from writing your own if the provided assertion methods do not offer what you are looking for.\n \n-Phew, I hope I made the transition quite painless for you. Now the last thing to add -- as there is not `Main()` method anymore in the last example, you surely must wonder how we run those tests, right? Ok, the last big secret unveiled -- we use an external application for this (we will refer to it using a term **Test Runner**) -- we tell it which assemblies to run and it loads them, runs them, reports results etc. It can take various forms, e.g. it can be a console application, a GUI application or a plugin to our IDEs. Here is an example of a stand-alone runner for xUnit.NET framework:\n+Phew, I hope I made the transition quite painless for you. Now the last thing to add -- as there is no `Main()` method anymore in the last example, you surely must wonder how we run those tests, right? Ok, the last big secret unveiled -- we use an external application for this (we will refer to it using the term **Test Runner**) -- we tell it which assemblies to run and it loads them, runs them, reports results etc. It can take various forms, e.g. it can be a console application, a GUI application or a plugin for an IDE. Here is an example of a stand-alone runner for the xUnit.NET framework:\n \n-![XUnit.NET window](images/XUnit_NET_Window.png)\n+![xUnit.NET window](images/XUnit_NET_Window.png)\n \n Mocking framework\n -----------------\n \n-Mocking libraries automate runtime creation of objects (called “mocks\") that adhere to specified interface. Aside from the creation itself, the libraries provide an API to configure our mocks on how they behave when certain methods are called on them and to let us inspect which calls they received.\n+A mocking framework lets us create objects at runtime (called “mocks\") that adhere to a certain interface. That interface is specified when the mock is created. Aside from the creation, the framework provides an API to configure the mocks on how they behave when certain methods are called on them and to let us inspect which calls they received.\n \n-Mocking libraries are not as old as xUnit frameworks and were not present in TDD at very beginning. As you might be wondering why on earth do we need something like this, I will let you in on a secret: they were born with a goal of aiding a specific approach to object-oriented design in mind. This kind of design is what TDD can support quite well as you will soon experience.\n+Mocking frameworks are not as old as test frameworks and they were not present in TDD at the very beginning. Why on earth do we need something like this? Well, they where invented to support a specific approach to object-oriented design that is a very good fit to TDD as you soon will experience.","path":"manuscript/040_Three_Essential_Tools.md","position":122,"original_position":122,"commit_id":"1101cfe16daf2ae5bbc08d0a4d45d364adf8205e","original_commit_id":"1101cfe16daf2ae5bbc08d0a4d45d364adf8205e","user":{"login":"martinmoene","id":1999290,"avatar_url":"https://avatars.githubusercontent.com/u/1999290?v=3","gravatar_id":"","url":"https://api.github.com/users/martinmoene","html_url":"https://github.com/martinmoene","followers_url":"https://api.github.com/users/martinmoene/followers","following_url":"https://api.github.com/users/martinmoene/following{/other_user}","gists_url":"https://api.github.com/users/martinmoene/gists{/gist_id}","starred_url":"https://api.github.com/users/martinmoene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinmoene/subscriptions","organizations_url":"https://api.github.com/users/martinmoene/orgs","repos_url":"https://api.github.com/users/martinmoene/repos","events_url":"https://api.github.com/users/martinmoene/events{/privacy}","received_events_url":"https://api.github.com/users/martinmoene/received_events","type":"User","site_admin":false},"body":"Rereading [A Brief History of Mock Objects](http://www.mockobjects.com/2009/09/brief-history-of-mock-objects.html) by Tim Mackinnon.\r\n\r\nJust realising the word *born* gives a good indication, however I'd use a different word or use several words to describe it.\r\n\r\n...working...","created_at":"2015-08-19T20:27:34Z","updated_at":"2015-08-19T20:27:34Z","html_url":"https://github.com/grzesiek-galezowski/tdd-ebook/pull/40#discussion_r37463591","pull_request_url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/pulls/40","_links":{"self":{"href":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/pulls/comments/37463591"},"html":{"href":"https://github.com/grzesiek-galezowski/tdd-ebook/pull/40#discussion_r37463591"},"pull_request":{"href":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/pulls/40"}}},"pull_request":{"url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/pulls/40","id":42780944,"html_url":"https://github.com/grzesiek-galezowski/tdd-ebook/pull/40","diff_url":"https://github.com/grzesiek-galezowski/tdd-ebook/pull/40.diff","patch_url":"https://github.com/grzesiek-galezowski/tdd-ebook/pull/40.patch","issue_url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/issues/40","number":40,"state":"open","locked":false,"title":"Improve style (Three essential tools)","user":{"login":"martinmoene","id":1999290,"avatar_url":"https://avatars.githubusercontent.com/u/1999290?v=3","gravatar_id":"","url":"https://api.github.com/users/martinmoene","html_url":"https://github.com/martinmoene","followers_url":"https://api.github.com/users/martinmoene/followers","following_url":"https://api.github.com/users/martinmoene/following{/other_user}","gists_url":"https://api.github.com/users/martinmoene/gists{/gist_id}","starred_url":"https://api.github.com/users/martinmoene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinmoene/subscriptions","organizations_url":"https://api.github.com/users/martinmoene/orgs","repos_url":"https://api.github.com/users/martinmoene/repos","events_url":"https://api.github.com/users/martinmoene/events{/privacy}","received_events_url":"https://api.github.com/users/martinmoene/received_events","type":"User","site_admin":false},"body":"Quite a lot of changes, I hope you like them!\r\n","created_at":"2015-08-19T06:32:14Z","updated_at":"2015-08-19T20:27:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3c27ed0fcaafbed6790c20ac75f2049c71a27c98","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/pulls/40/commits","review_comments_url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/pulls/40/comments","review_comment_url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/pulls/comments{/number}","comments_url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/issues/40/comments","statuses_url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/statuses/1101cfe16daf2ae5bbc08d0a4d45d364adf8205e","head":{"label":"martinmoene:040_Three_Essential_Tools.md-style","ref":"040_Three_Essential_Tools.md-style","sha":"1101cfe16daf2ae5bbc08d0a4d45d364adf8205e","user":{"login":"martinmoene","id":1999290,"avatar_url":"https://avatars.githubusercontent.com/u/1999290?v=3","gravatar_id":"","url":"https://api.github.com/users/martinmoene","html_url":"https://github.com/martinmoene","followers_url":"https://api.github.com/users/martinmoene/followers","following_url":"https://api.github.com/users/martinmoene/following{/other_user}","gists_url":"https://api.github.com/users/martinmoene/gists{/gist_id}","starred_url":"https://api.github.com/users/martinmoene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinmoene/subscriptions","organizations_url":"https://api.github.com/users/martinmoene/orgs","repos_url":"https://api.github.com/users/martinmoene/repos","events_url":"https://api.github.com/users/martinmoene/events{/privacy}","received_events_url":"https://api.github.com/users/martinmoene/received_events","type":"User","site_admin":false},"repo":{"id":40433768,"name":"tdd-ebook","full_name":"martinmoene/tdd-ebook","owner":{"login":"martinmoene","id":1999290,"avatar_url":"https://avatars.githubusercontent.com/u/1999290?v=3","gravatar_id":"","url":"https://api.github.com/users/martinmoene","html_url":"https://github.com/martinmoene","followers_url":"https://api.github.com/users/martinmoene/followers","following_url":"https://api.github.com/users/martinmoene/following{/other_user}","gists_url":"https://api.github.com/users/martinmoene/gists{/gist_id}","starred_url":"https://api.github.com/users/martinmoene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinmoene/subscriptions","organizations_url":"https://api.github.com/users/martinmoene/orgs","repos_url":"https://api.github.com/users/martinmoene/repos","events_url":"https://api.github.com/users/martinmoene/events{/privacy}","received_events_url":"https://api.github.com/users/martinmoene/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/martinmoene/tdd-ebook","description":"Test-Driven Development - Extensive Tutorial. Open Source ebook","fork":true,"url":"https://api.github.com/repos/martinmoene/tdd-ebook","forks_url":"https://api.github.com/repos/martinmoene/tdd-ebook/forks","keys_url":"https://api.github.com/repos/martinmoene/tdd-ebook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/martinmoene/tdd-ebook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/martinmoene/tdd-ebook/teams","hooks_url":"https://api.github.com/repos/martinmoene/tdd-ebook/hooks","issue_events_url":"https://api.github.com/repos/martinmoene/tdd-ebook/issues/events{/number}","events_url":"https://api.github.com/repos/martinmoene/tdd-ebook/events","assignees_url":"https://api.github.com/repos/martinmoene/tdd-ebook/assignees{/user}","branches_url":"https://api.github.com/repos/martinmoene/tdd-ebook/branches{/branch}","tags_url":"https://api.github.com/repos/martinmoene/tdd-ebook/tags","blobs_url":"https://api.github.com/repos/martinmoene/tdd-ebook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/martinmoene/tdd-ebook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/martinmoene/tdd-ebook/git/refs{/sha}","trees_url":"https://api.github.com/repos/martinmoene/tdd-ebook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/martinmoene/tdd-ebook/statuses/{sha}","languages_url":"https://api.github.com/repos/martinmoene/tdd-ebook/languages","stargazers_url":"https://api.github.com/repos/martinmoene/tdd-ebook/stargazers","contributors_url":"https://api.github.com/repos/martinmoene/tdd-ebook/contributors","subscribers_url":"https://api.github.com/repos/martinmoene/tdd-ebook/subscribers","subscription_url":"https://api.github.com/repos/martinmoene/tdd-ebook/subscription","commits_url":"https://api.github.com/repos/martinmoene/tdd-ebook/commits{/sha}","git_commits_url":"https://api.github.com/repos/martinmoene/tdd-ebook/git/commits{/sha}","comments_url":"https://api.github.com/repos/martinmoene/tdd-ebook/comments{/number}","issue_comment_url":"https://api.github.com/repos/martinmoene/tdd-ebook/issues/comments{/number}","contents_url":"https://api.github.com/repos/martinmoene/tdd-ebook/contents/{+path}","compare_url":"https://api.github.com/repos/martinmoene/tdd-ebook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/martinmoene/tdd-ebook/merges","archive_url":"https://api.github.com/repos/martinmoene/tdd-ebook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/martinmoene/tdd-ebook/downloads","issues_url":"https://api.github.com/repos/martinmoene/tdd-ebook/issues{/number}","pulls_url":"https://api.github.com/repos/martinmoene/tdd-ebook/pulls{/number}","milestones_url":"https://api.github.com/repos/martinmoene/tdd-ebook/milestones{/number}","notifications_url":"https://api.github.com/repos/martinmoene/tdd-ebook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/martinmoene/tdd-ebook/labels{/name}","releases_url":"https://api.github.com/repos/martinmoene/tdd-ebook/releases{/id}","created_at":"2015-08-09T11:13:50Z","updated_at":"2015-08-09T11:13:50Z","pushed_at":"2015-08-19T06:35:14Z","git_url":"git://github.com/martinmoene/tdd-ebook.git","ssh_url":"git@github.com:martinmoene/tdd-ebook.git","clone_url":"https://github.com/martinmoene/tdd-ebook.git","svn_url":"https://github.com/martinmoene/tdd-ebook","homepage":"feelings-erased.blogspot.com","size":26003,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"grzesiek-galezowski:master","ref":"master","sha":"745ab402dfb8cad7c4a564ccde0907976931f005","user":{"login":"grzesiek-galezowski","id":2021470,"avatar_url":"https://avatars.githubusercontent.com/u/2021470?v=3","gravatar_id":"","url":"https://api.github.com/users/grzesiek-galezowski","html_url":"https://github.com/grzesiek-galezowski","followers_url":"https://api.github.com/users/grzesiek-galezowski/followers","following_url":"https://api.github.com/users/grzesiek-galezowski/following{/other_user}","gists_url":"https://api.github.com/users/grzesiek-galezowski/gists{/gist_id}","starred_url":"https://api.github.com/users/grzesiek-galezowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grzesiek-galezowski/subscriptions","organizations_url":"https://api.github.com/users/grzesiek-galezowski/orgs","repos_url":"https://api.github.com/users/grzesiek-galezowski/repos","events_url":"https://api.github.com/users/grzesiek-galezowski/events{/privacy}","received_events_url":"https://api.github.com/users/grzesiek-galezowski/received_events","type":"User","site_admin":false},"repo":{"id":9156307,"name":"tdd-ebook","full_name":"grzesiek-galezowski/tdd-ebook","owner":{"login":"grzesiek-galezowski","id":2021470,"avatar_url":"https://avatars.githubusercontent.com/u/2021470?v=3","gravatar_id":"","url":"https://api.github.com/users/grzesiek-galezowski","html_url":"https://github.com/grzesiek-galezowski","followers_url":"https://api.github.com/users/grzesiek-galezowski/followers","following_url":"https://api.github.com/users/grzesiek-galezowski/following{/other_user}","gists_url":"https://api.github.com/users/grzesiek-galezowski/gists{/gist_id}","starred_url":"https://api.github.com/users/grzesiek-galezowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grzesiek-galezowski/subscriptions","organizations_url":"https://api.github.com/users/grzesiek-galezowski/orgs","repos_url":"https://api.github.com/users/grzesiek-galezowski/repos","events_url":"https://api.github.com/users/grzesiek-galezowski/events{/privacy}","received_events_url":"https://api.github.com/users/grzesiek-galezowski/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/grzesiek-galezowski/tdd-ebook","description":"Test-Driven Development - Extensive Tutorial. Open Source ebook","fork":false,"url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook","forks_url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/forks","keys_url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/teams","hooks_url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/hooks","issue_events_url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/issues/events{/number}","events_url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/events","assignees_url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/assignees{/user}","branches_url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/branches{/branch}","tags_url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/tags","blobs_url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/git/refs{/sha}","trees_url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/statuses/{sha}","languages_url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/languages","stargazers_url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/stargazers","contributors_url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/contributors","subscribers_url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/subscribers","subscription_url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/subscription","commits_url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/commits{/sha}","git_commits_url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/git/commits{/sha}","comments_url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/comments{/number}","issue_comment_url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/issues/comments{/number}","contents_url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/contents/{+path}","compare_url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/merges","archive_url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/downloads","issues_url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/issues{/number}","pulls_url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/pulls{/number}","milestones_url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/milestones{/number}","notifications_url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/labels{/name}","releases_url":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/releases{/id}","created_at":"2013-04-01T21:17:47Z","updated_at":"2015-08-17T19:39:37Z","pushed_at":"2015-08-19T09:25:39Z","git_url":"git://github.com/grzesiek-galezowski/tdd-ebook.git","ssh_url":"git@github.com:grzesiek-galezowski/tdd-ebook.git","clone_url":"https://github.com/grzesiek-galezowski/tdd-ebook.git","svn_url":"https://github.com/grzesiek-galezowski/tdd-ebook","homepage":"https://leanpub.com/tdd-ebook","size":28074,"stargazers_count":60,"watchers_count":60,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6,"mirror_url":null,"open_issues_count":9,"forks":6,"open_issues":9,"watchers":60,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/pulls/40"},"html":{"href":"https://github.com/grzesiek-galezowski/tdd-ebook/pull/40"},"issue":{"href":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/issues/40"},"comments":{"href":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/issues/40/comments"},"review_comments":{"href":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/pulls/40/comments"},"review_comment":{"href":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/pulls/40/commits"},"statuses":{"href":"https://api.github.com/repos/grzesiek-galezowski/tdd-ebook/statuses/1101cfe16daf2ae5bbc08d0a4d45d364adf8205e"}}}}