By Developers, For Developers

Historical errata for Pragmatic Unit Testing in Java 8 with JUnit

PDF PgPaper PgTypeDescriptionFixed onComments
5TYPO

…putting the tests in one source folder (src) and the production code in another (test).

2014-11-29
ivTYPO

Bullet item states “third party code no longer behaviors” should be “third party code no longer behaves”

2014-11-29
3TYPO

“But he spent about over fifteen minutes working through the three cycles of code …”

should probably read

“But he spent over fifteen minutes working through the three cycles of code …”

2014-11-29
16TYPO

The word “criterium” appears many times. The singular of “criteria” is “criterion.”

Apparently a “criterium” is a bicycle race. Who knew?

2014-11-29Yow. Ugh! Thanks for spotting this one. :-) I should know better, we even get our bikes repaired at place called Criterium. \n \nI remember some nagging thought quickly whistling in the back of my head when I first typed "criterium."
42TYPO

The word “exerised” should be exercised.

Here is the context:
“…return value of the exerised code…”

2014-12-16
52TYPO

The word “shuld” should be “should” in:

“…The vast majority of your unit tests shuld be blindingly
fast…”

2014-12-16
120113TYPO

“Open-Closed Princple (OCP)”
should be
“Open-Closed Principle (OCP).”

thanks and good catches on the typos

2014-12-16
157SUGGEST

The link should be dereferenced in:
it appeared in .

2015-01-06
157ERROR

broken link at line 2 from bottom

2015-01-06
95TYPO

“0-10-n” -> “0-1-n”

2015-01-06
130TYPO

“Is changing our system’s just to write a test a bad thing?”: The “’s” does not make sense.

2015-01-06
2714TYPO

The first sentence after “Is the Test Really Testing Anything?” heading:

You might event want to -> You might even want to

2015-01-06
182186TYPO

it says “talkes” instead of “talks”
This is on the Thanks a Lot, Controller section. Sentence is “.. which talkes to a Postgres database”

2015-01-06
5646TYPO

In the 3rd paragraph:

Your best best is to extract … -> Your best bet is to extract

2015-01-14
8ERROR

“important bit” #5: I think it should be “Eclipse creates a single test method …” JUnit itself didn’t create the test method (unless it’s the case that the JUnit support in Eclipse is actually written and maintained by the JUnit team, but even then it seems like a technicality and is likely not true in other development environments).

66SUGGEST

scores.size() == 0 replaced by !scores.isEmpty()

100TYPO

The very existence of automated IDE automated should reinforce the idea that refactorings are code transformation that don’t affect functional behavior.
“automated IDE automated” ?
Automated IDE actions? Automated IDE

136SUGGEST

pageContent.getBytes() —> pageContent.getBytes(StandardCharsets.UTF_8)

I kno wthat it changes nothing from the purpose of the book but seems important to me to show best practice in this reference book.

same code is repeated on page 101

189SUGGEST

“Some IDEs support code-review plug-ins”
I think that nowadays lost of the IDEs are supporting it.
For Eclipse there are even severals:

- R4E
- EGerrit

123ERROR

Missing ampersand in line 9 of the code?

Wrong:
…format(“lat=.6flon=.6f”, latitude, longitue)

Correct:
…format(“lat=.6f&lon=.6f”, latitude, longitue)

See the test on p. 129: if (!url.contains(“lat=38.000000&lon=–104.0000000”)

Regards.

Categories: