How do I make a data file available to unit tests?

后端 未结 2 1963
太阳男子
太阳男子 2021-01-23 05:10

I\'m using VS2008 TFS (with MSTest).

I have a unit test that works reliably, relying on a data file in a subfolder of the project (ie testproject1\\TestData). The data f

2条回答
  •  灰色年华
    2021-01-23 05:42

    Use the DeploymentItem attribute (more info here).

    Edit: As per the OP, the .testrunconfig file must also be edited.

提交回复
热议问题