|
|
|
|
|
by adamconroy
3665 days ago
|
|
When people (such as this author) talk about mocks, are they talking about mocking and testing behavior or just simply fakes / doubles? My understanding of mocking by example is: you have a class you want to test, and that class has a dependency on lets say a Mail class that has a SendMail() method. You mock the Mail class and assert that SendMail() was called as per your specification. Given that definition of mocking, I personally don't like mocking. I prefer to test state not behavior, although I can see in some scenarios behavior is more important. |
|
In short yea, you're right.