The repository itself is not usually tested?

后端 未结 4 1164
你的背包
你的背包 2020-11-28 08:19

I\'m sorry but I\'m new to repositories patterns, unit tests and orm tools.

I\'ve been researching on unit tests and the repository pattern, and arrived at some conc

4条回答
  •  悲&欢浪女
    2020-11-28 08:48

    It's pretty common to make repositories which are just lightweight wrappers of your DB access and put business methods in an entity service layer which depends on the repositories, yes. So you can unit test the entity services by using repositories which wrap, e.g., an in-memory DB.

提交回复
热议问题