Mock Objects vs Test Database

后端 未结 6 1906
庸人自扰
庸人自扰 2021-02-19 20:42

What\'s the advantage of using mock objects in comparison to a static test database that has known data and using transactions to make sure nothing changes when testing against

6条回答
  •  无人及你
    2021-02-19 20:42

    You can do both. Use mock objects to test you BLL logic and then use a test database to test your DAL logic. That way if something breaks you can easily see where the problem lies by which test fails.

提交回复
热议问题