View Single Post
  #1 (permalink)  
Old March 26th, 2013, 06:05 PM
SleepyCatChris SleepyCatChris is offline
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2013
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation Chapter 7: Unit Test Only Tests the Mock?

I really appreciated chapter 7 overall, it was a nice walk-through of a simple TDD approach.

However, I'm concerned about the part that tests that an ArgumentNullException is thrown. The way it is written, this unit test is testing the mock, not the actual entity!

Maybe the example wasn't completed accidentally, but code should have been added to the ItemTypeRepository to actually throw an ArgumentNullException when called with "null".