In Castle Windsor 3, override an existing component registration in a unit test

前端 未结 2 678
自闭症患者
自闭症患者 2020-12-15 03:56

I am attempting to use Castle Windsor in my automated tests like so:

On every test:

  • The Setup() function creates a Windsor container, regi
2条回答
  •  生来不讨喜
    2020-12-15 04:40

    Don't reuse your container across tests. Instead, set it to null in the TearDown() and re-initialise it for each actual test.

提交回复
热议问题