Mocking vs. Test DB?

前端 未结 8 2083
无人及你
无人及你 2020-12-29 20:44

Earlier I asked this question How to correctly unit test my DAL?, one thing left unanswered for me is if to really test my DAL is to have a Test DB, then what is the role of

8条回答
  •  粉色の甜心
    2020-12-29 21:32

    By using a test database, you open up the possibility that problems could be caused at the database itself or along the communication path (network, etc) between the DAL and database. Mocking eliminates those possibilities.

提交回复
热议问题