You must deploy the file to the shadow directory MSTest, which is used in TestInitialize ()

I have a unit test that deploys a database using a .bak file in the TestInitialize method. I run this test from mstest using dll (not VS), so I need a .bak file to copy it to the shadow directory created by mstest.

I don’t want to add [DeploymentItem] attributes to each test method, I’m not even sure that this will work, because TestInitialize is the method that uses this file.

Is there a tag that I can add to the project, which will ensure that the .bak file is copied to the shadow directory when working with MSTest in a test DLL?

thanks

+4
source share
1 answer

Source: https://habr.com/ru/post/1338305/


All Articles