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.

susan.harkins-LOCKED (26) [Avatar] Offline
#1
Please post errors found in the published version of The Art of Unit Testing, Second Edition here. If necessary, we'll publish a comprehensive list for everyone's convenience. Thank you for participating in this process. Your comments help us and other readers.

Regards,
Susan Harkins
Errata Editor
jivey (3) [Avatar] Offline
#2
Re: Errata
On page xxiv, under 'Code Conventions and Downloads', it indicates:
"A Readme.txt file is provided in the root folder and also in each chapter folder; the files provide details on how to install and run the code."

I certainly could not find me any readme.txt files in either the git repository or the zip file downloaded from his web site (http://artofunittesting.com/).
Thorarin (4) [Avatar] Offline
#3
Re: Errata
Page 25:
"The first test will be to send in a valid filename and make sure the method returns true."
First test is not a test if method returns true, but rather false: IsValidLogFileName_BadExtension_ReturnsFalse

Page 25:
"assuming that your class under test is named LogAnalyzer.cs"
Remove ".cs" since we're talking about a class.

Page 29:
"Nugget" should read "NuGet".


There have been more, but unfortunately I cannot remember at the moment. I've only (carefully) read up to page 31 so far. I'm sorry to say that quality wise this is the worst Manning book I own so far. Not the contents of the book, but apart from the errors I've run into, the code formatting for example is very inconsistent and generally horrendous when it comes to whitespace.

Message was edited by:
Thorarin
sokrman20 (1) [Avatar] Offline
#4
Re: Errata
Page 64 in class ExtensionManagerFactory:

"Return new FileExtensionManager"

should be

"return new FileExtensionManager"
Pextant (1) [Avatar] Offline
#5
Re: Errata
In addition to the error noted by sokrman20 in the ExtensionManagerFactory class on page 64, the field and two methods should be declared as static and "If" should be lowercase "if". It looks like there's no way to post pre-formatted code here, so you'll have to image the following with indenting:

class ExtensionManagerFactory
{
private static IExtensionManager customManager = null;

public static IExtensionManager Create()
{
if (customManager != null) return customManager;
return new FileExtensionManager();
}

public static void SetManager(IExtensionManager mgr)
{
customManager = mgr;
}
}
Ersin Er (3) [Avatar] Offline
#6
Errata
In section 2.6.1, the sentence

You almost never, ever use TearDown or TestFixture methods in unit test projects.

should read

You almost never, ever use TearDown or TestFixtureTearDown methods in unit test projects.

(I am reading the book from Safari Books Online.)
Ersin Er (3) [Avatar] Offline
#7
Errata
In section 2.6.2, the sentence

You’re not asserting full string equality with Assert.AreEqual but use String-Assert.Contains.

should read

You’re not asserting full string equality with Assert.AreEqual but use StringAssert.Contains.

(No dash.)
Ersin Er (3) [Avatar] Offline
#8
Errata
In section 3.4, the phrase

... where a class’s functionality is open for extenuation ...

should read

... where a class’s functionality is open for extension ...
Susan Harkins (424) [Avatar] Offline
#9
An errata list for The Art of Unit Testing, Second Edition is available at https://manning-content.s3.amazonaws.com/download/c/033b568-8076-4894-a60f-964c05e9e5ea/OSHEROVE2_TheArtofUnitTesting2E_err1.html. Thank you for participating in this process. Your comments help us and other readers.

Regards,
Susan Harkins
Errata Editor