What's the point of testing fake repositories?

后端 未结 3 1398
清歌不尽
清歌不尽 2021-02-14 20:08

I\'ve been trying to push my mentallity when developing at home to be geared more towards TDD and a bit DDD.

One thing I don\'t understand though is why you would creat

3条回答
  •  粉色の甜心
    2021-02-14 20:22

    The fake repository allows you to test just your application code.

    The fake repository means an automated test can easily set up a known state in the repository.

    The fake repository will be several orders of magnitude faster than a real database.

    The fake repository is NOT a substitute for system testing that will include your database.

提交回复
热议问题