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.

dalrympm (20) [Avatar] Offline
#1
In the "JUnit best practices: EasyMock object creation" callout box there is some confusing text.

The second section of the callout states:

"So which one should we use? The second one is better. If you
use the first one and your expectations don’t get met, then you
get an error message like the following:
java.lang.AssertionError:
Expectation failure on verify:
read(): expected: 7, actual: 0
"

However, the third section of the callout states:

"As you see this message is not as descriptive as we want it to
be. If you use the first signature, instead, and we map the
class to a given name, we would get something like the
following:
java.lang.AssertionError:
Expectation failure on verify:
name.read(): expected: 7, actual: 0
"

Either the second section is correct and the third section should be updated to say "If you use the second signature, instead...." OR the third section is correct and the second section should be updated to say "The first one is better. If you use the second one..."