Complex issue.
Say I have to program some business logic, and all business logic needs to get data through some form of DAL.
Say that for testing purposes, I mock DAL units (creating "mockingbirds").
But these mockingbirds, of course, are additional units in their own right. Therefore, even when using mocks, it may seem that I still have to break the idea of ​​“no other units involved” when I want to test my business logic module in a unit.
Of course, it is well known that “creating mockingbirds for DAL” can deprive you of the very test for the score, which your mockingbird rejects in a certain aspect from DAL.
Conclusion: Is it not possible to perform “genuine unit tests” in business modules that in any way depend on any type of DAL, question mark?
Corrolary: the only thing that can be ("authentically"!) Checked for unity is DAL itself, a question mark?
Corrolary of corrolary: provided that “DAL” is usually the ORM or the DML of some DBMS, and given that these products are usually bought as “proven technologies”, what is the added value of the unit that checks that this is always the case with a question mark?
Erwin Smout Aug 10 '09 at 23:11 2009-08-10 23:11
source share