Hi,
suppose my applicaiton contains several layers, the lowest one is a DAL (Data Access Layer) interfacing with a DB.
Now, I want to unit-test a method of a class in the upper layer which eventually calls a method in the DAL. Naturally, I want to mock only the DB, not the mid-layer classes.
How should I go about unit-testing a high-layer method as mentioned above?
Thanks,
Michael
suppose my applicaiton contains several layers, the lowest one is a DAL (Data Access Layer) interfacing with a DB.
Now, I want to unit-test a method of a class in the upper layer which eventually calls a method in the DAL. Naturally, I want to mock only the DB, not the mid-layer classes.
How should I go about unit-testing a high-layer method as mentioned above?
Thanks,
Michael