TDD for Windows Store app development without mocks

前端 未结 2 907
遇见更好的自我
遇见更好的自我 2020-12-19 13:06

Has anyone come up with a good TDD setup for Windows Store App development? I\'m so used to using mocking frameworks, but this is no-longer an option since dynamic assembly

2条回答
  •  借酒劲吻你
    2020-12-19 13:59

    The approach I'm trying out now is placing the testable code in a regular .NET 4.5 assembly, allowing it to be unit tested with mocks using a normal unit test project. Then, in the Windows Store App project, these same source files are added as links. This is inconvenient since I'm having to duplicate project references between the two platforms, and I have to be careful to ensure the code compiles in both projects, but this approach does allow me to use better unit testing tools.

    I'm still eagerly waiting to see if someone comes up with something better.

提交回复
热议问题