The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

olerass (10) [Avatar] Offline
#1
** All information relates to the PDF version of the book! **

Currently updated for: MEAP version 8
Chapters covered so far: 1-2


This is a complete and up-to-date list of all typos, errors and suggestions that are still relevant (have not been corrected) to the latest MEAP edition of the book. I think it's a mess to have people post corrections in many different posts so maybe we can make this the thread to post new corrections to? I will add them here when you do.
I have compiled this by going through all forum posts and my own corrections as I am reading through the book. I will add more as I progress.
I have taken the liberty to correct some (very few) of the corrections already posted (a corrected correction I suppose?) and if you (the author) believe I am wrong please tell me and I will of course revert it. I may have misunderstood your intent. I have also added precise locations for all errors/suggestions.

Format of corrections:

== Pos in book (author) ==
- Optional message to author (Roy) here
Original text [..]*
Suggested text to replace original text [..]*


* [..] means continued line before or after.

Errors/typos

== Page 2, line 5 (mexinsane) ==
Exploring text-driven development [..]
Exploring test-driven development [..]

== Page 2, line 9 (TestToTheMax) ==
[..] unmaintainable. (Most people do.) On the other hand, [..]
[..] unmaintainable (most people do). On the other hand, [..]

== Page 3, line 4 (TestToTheMax) ==
We will be slowly changing it throught this chapter [..]
We will be slowly changing it throughout this chapter [..]

== Page 3, line 10 (SeanKilleen) ==
The thing you will write tests is called the system under test (SUT).
The thing you will write tests for is called the system under test (SUT).

== Page 3, line 11 from the bottom (TestToTheMax) ==
The invoked public method returns a value (A function that is not void)
The invoked public method returns a value (a function that is not void)

== Page 3, line 8 from the bottom (TestToTheMax) ==
[..] the system can Login a previously non existing user [..]
[..] the system can log in a previously non existing user [..]

== Page 3, line 4 from the bottom (TestToTheMax) ==
[..] (Examples: Calling a 3rd party logging system that was not written by you and you don’t have the source to) [..]
[..] (Example: calling a 3rd party logging system that was not written by you and that you don’t have the source to) [..]

== Page 3, line 2 from the bottom (TestToTheMax) ==
This idea of a unit work means that to me, a 'unit' [..]
This idea of a unit of work means to me that a 'unit' [..]

== Page 4, line 4 (olerass) ==
If you try to minize the size [..]
If you try to minimize the size [..]

== Page 6, line 2 (TestToTheMax) ==
- The person writing the unit test may not be the person changing the SUT
[..] (it always returns the same result if you didn’t change anything between runs) [..]
[..] (it always returns the same result if nothing was changed between runs) [..]

== Page 6, section 1.3, line 5 (olerass) ==
- It doesn't make sense to talk about "the current DateTime.Now". DateTime.Now is a property. It's the value of that property to which you should be referring
[..] it uses the current DateTime.Now in the test code.
[..] it uses the current date (DateTime.Now) in the test code.
OR
[..] it uses the current date, DateTime.Now, in the test code.

== Page 6, line 8 (olerass) ==
I think integration tests are very important counter parts to unit tests, [..]
I think integration tests are very important counterparts to unit tests, [..]

== Page 6, line 4 from bottom (TestToTheMax) ==
If a test uses the real database, then it not longer only running "in memory", [..]
If a test uses the real database, then it's no longer only running "in memory", [..]

== Page 7, line 3 (mexinsane) ==
Interation tests increase [..]
Integration tests increase [..]

== Page 9, section 1.3.1, first bullet-point, line 6 (olerass) ==
- I've never heard of "solving a bug". Fixing or correcting may be better words.
Sometimes they introduce new bugs inadvertently as they solve the old ones.
Sometimes they introduce new bugs inadvertently as they fix the old ones.
OR
Sometimes they introduce new bugs inadvertently as they correct the old ones.

== Page 11, line 5 (TestToTheMax) ==
[..] it may take an 30 minutes or more [..]
[..] it may take 30 minutes or more [..]

== Page 11, line 5 (TestToTheMax) ==
[..] against an object model you’ve never unit tested before.
[..] against an object model they’ve never unit tested before.

== Page 12, section 1.5, line 10 (olerass) ==
[..] the code can only handle 0 or 1 number).
[..] the code can only handle 0 or 1 numbers).

== Page 12, line 4 from bottom (olerass) ==
- SimpleParserTests is a class, not a method
[..] we can write a SimpleParserTests method as shown [..]
[..] we can write a SimpleParserTests class as shown [..]

== Page 12, line 3 from bottom (olerass) ==
- You cannot "invoke a class" - I believe you mean the method?
The test method invokes the production class (the class to be tested) [..]
The test method invokes the production method (in the class to be tested) [..]
OR
The test method invokes the production method (the method to be tested) [..]

== Page 12, listing 1.2 (olerass) ==
- Problem with bracket alignment in code. The { bracket after the class declaration should be left aligned

== Page 14, listing 1.4 (TestToTheMax) ==
- Problem with spacing in code
public static void ShowProblem(string test,string message )
public static void ShowProblem(string test, string message)

== Page 14, listing 1.4 (TestToTheMax) ==
- Problem with spacing in comments
// it's possible to hard code this,
//it's possible to hard code this,

== Page 14, listing 1.4 (olerass) ==
- Problem with bracket alignment in code. The { bracket after the method declaration should be left aligned (as should the ending bracket)

== Page 17, line 3 from bottom (TestToTheMax) ==
keep your manager happier
keep your manager happy
OR
make your manager happier

== Page 17, list-point 1, line 2 (olerass) ==
The test is written as if the production code were already working, so [..]
The test is written as if the production code is already working, so [..]

== Page 18, section 1.7, line 2 (TestToTheMax) ==
[..] Knowing how to write good tests, Writing them test-first, [..]
[..] knowing how to write good tests, writing them test-first, [..]

== Page 18, section 1.7, line 4 (TestToTheMax) ==
Good Unit Testing skills [..]
Good unit testing skills [..]

== Page 20, line 2 from bottom (olerass) ==
NUnit contains better features than mstest [..]
NUnit contains better features than MS-Test [..]

== Page 21, section 2.1, line 2 (olerass) ==
[..] to get things just write, [..]
[..] to get things just right, [..]

== Page 23, table 2.1, second bullet-point in first row (cfroese) ==
- The end of the sentence is missing.
[..] attributes to place in your code to note which of your tests

== Page 25, section 2.3.1, line 3 (olerass) ==
[..] within visual studio with a few clicks or a simple command text.
[..] within visual studio with a few clicks or a simple text command.

== Page 25, section 2.3.1, line 8 from bottom (olerass) ==
NUget only installes required dlls, [..]
NUget only installs required dlls, [..]

== Page 25, section 2.3.1, line 8 from bottom (oleras) ==
[..], but not the UI (this makes some sense because [..]
[..], but not the UI (this makes sense because [..]

== Page 27, line 3 (olerass) ==
- 2in1 correction smilie
Please note that I1ve purposfuly left out [..]
Please note that I've purposefully left out [..]

== Page 29, line 2 (olerass) ==
I usually prefer to seprate them, [..]
I usually prefer to separate them, [..]

== Page 29, line 3 (olerass) ==
[..] aren't happy including tests intheir production code, [..]
[..] aren't happy including tests in their production code, [..]

== Page 30, line 2 from bottom (olerass) ==
[..] that make asserting various things cleaner. (such as Assert.False we use).
[..] that make asserting various things cleaner (such as the Assert.False we used).

== Page 31, section 2.4.2, line 6 from bottom (olerass) ==
- 2in1 correction smilie
[..] (If youl installed NUnit manuall, find [..]
[..] (If you installed NUnit manually, find [..]

== Page 32, code snippet after line 5 (olerass) ==
- You mention that the code should be changed to add the missing '!' and then post a snippet that shows the -should be- correct code, but it isn't: the '!' is still missing in the code snippet

== Page 34, section 2.4.5, line 7 (olerass) ==
IT makes the code much more readable.
It makes the code much more readable.

== Page 34, section 2.5, line 5 (olerass) ==
[..] better things to do that to start chasing the compiler, [..]
[..] better things to do than to start chasing the compiler, [..]

== Page 37, line 7 (olerass) ==
If you like that sort of thing, now is a good time to refactor that. I'm not.
If you like that sort of thing, now is a good time to refactor that. I don't.

== Page 38, line 5 from bottom (olerass) ==
- 2in1 correction smilie
[..] how to the test gets its instances, and what is the type of each object [..]
[..] how the test gets its instances, and what the type is of each object [..]

== Page 38, line 4 from bottom (olerass) ==
[..] "Imagine that the reader of your test is has never met you [..]
[..] "Imagine that the reader of your test has never met you [..]

== Page 39, line 2 from bottom (olerass) ==
In listing 2.1 we have two unit tests
In listing 2.2 we have two unit tests

== Page 40, last line (olerass) ==
We're going to test the method logic in listing 2.2.
We're going to test the method logic in listing 2.3.

== Page 41, line 8 from bottom (jbin) ==
Given the method in listing 2.2 [..]
Given the method in listing 2.3 [..]

== Page 41, line 2 from bottom (olerass) ==
[..] we don't know which line through the exception.
[..] we don't know which line threw the exception.

== Page 43, line 9 from bottom (olerass) ==
- Consider rewriting this fragment altogether. "Helpful helpers" doesn't sound too good.
It's contains helpful helpers [..]
It contains helpful helpers [..]

== Page 43, last line (olerass) ==
[..] we added a new 'feature' to the beginning of end of [..]
[..] we added a new 'feature' to the beginning or end of [..]

== Page 47, line 2 (olerass) ==
This is because I view this is a slightly different [..]
This is because I view this in a slightly different [..]

Suggestions

== Page 3, definition Unit of Work (TestToTheMax) ==
- If you mean one out of three things then:
An end result is either of the following: [..]
An end result is any one of the following: [..]

== Page 5, section 1.2 (TestToTheMax) ==
- Be consistent about the use of full stops at the end of each bullet point.

== Page 13, line 9 from bottom (olerass) ==
- Funny sentence. What is a "problem output"?
Each test is responsible for writing the problem output [..]

== Page 14, line 1 (olerass) ==
- Funny sentence: "help make helper methods". Consider rewriting.
Unit-testing frameworks can help make helper methods more generic [..]

== Page 17, list-point 1, line 2 (olerass) ==
- What you write is true, but it's worth mentioning that we also assume not only working but existing code when writing a test. It sounds as the code is already there if you don't mention it explicitly.
The test is written as if the production code were already working, so [..]
The test is written as if the production code were already present and working, so [..]

== Page 18, section 1.7, third bullet-point (TestToTheMax) ==
- Be consistent about hyphenation and casing of “test-first” and “Test First”.
[..] the same benefits as when writing them test-first. Test First skills are what [..]

== Page 23, table 2.1, row 2 and 3 (olerass) ==
- Be consistent about hyphenation of "test runner". The second row uses "test runner" while the third uses "test-runners"

== Page 27, 28, 29, 30 (jbin, olerass) ==
- The book disagrees with itself several times through these pages. On page 27 line 12 from bottom you say that "Our first test will be to send in a valid filename, [..] and check it returns true". Then a few lines down (line 3 from bottom) you say we need to add a method "IsValidLogFileName_BadExtension_ReturnsFalse". This doesn't make any sense - it's complete opposite tests. This goes on for the next few pages where you alternate between saying we are writing a bad and good test. On page 28 line 2 from bottom you write "[..] the scenario is that we are sending the method a valid filename, [..]". Again very confusing. There are possibly references like these on page 29 and 30 as well.

== Page 39, listing 2.2 (olerass) ==
- This example breaks several of your own best practices (apart from the intended SetUp/TearDown pattern). For example you test names are not properly cased (minor error) but worse is it that you use the assert messages in calls to Assert.True in both tests.
olerass (10) [Avatar] Offline
#2
Re: [Complete, updated, unfixed list] Typos, errors, suggestions - ADD NEW HERE
Added corrections for chapter 2.
PMBottas (4) [Avatar] Offline
#3
Re: [Complete, updated, unfixed list] Typos, errors, suggestions - ADD NEW HERE
== v12, Page 18, line 7 (PMBottas) ==
TDD “tests your tests” in that it lets you see them ail and pass [..]
TDD “tests your tests” in that it lets you see them fail and pass [..]

Message was edited by: PMBottas
PMBottas