Using StructureMap with unit tests

后端 未结 2 1047
北海茫月
北海茫月 2021-01-11 18:24

I\'m using StructureMap in a web project for DI IOC. It works perfect, but I don\'t have a clue how to write unit tests with StructureMap.

Should I do this in Assemb

2条回答
  •  情话喂你
    2021-01-11 19:03

    You shouldn't need to use a DI Container in unit tests at all.

    A container is something you use to wire components together, but a unit test is a test of each component in isolation.

提交回复
热议问题