Mocking and faking are ways to isolate code or components to ensure that unit tests run against the testable unit of code only without actually utilizing other components or dependencies of an application. Mocking differs from faking in that a mock can be inspected to assert the results of a test.
I have found that there are only 3 ways to unit test (mock/stub) dependencies that are static in C#.NET: Moles TypeMock JustMock Given that two of these are not free and one has not hit release ...
I have a particular method called TranslateValues() (Cyclomatic-Complexity of 5) which I would like to test. The test requires a substantial number of mock objects which take up most of the method; ...
I understand the value of automated testing and use it wherever the problem is well-specified enough that I can come up with good test cases. I've noticed, though, that some people here and on ...
I've read a lot of things about TDD but I still have doubts. For example, I have these class diagrams: It's a simple example, just to learn about TDD and mock objects. Which test should I write ...
I titled the question jokingly because I'm sure that "it depends," but I have some specific questions. Working in software that has many deep layers of dependency, my team has become accustomed using ...
Sometimes objects just need to be tightly coupled. For example, a CsvFile class will probably need to work tightly with the CsvRecord class (or ICsvRecord interface). However from what I learned in ...