I have some files I want to use in my unit tests but I make those files related to the location of DLL Want to have unit tests in it, is it possible?
In other words I have included in a resource folder that contains some files for testing my unit to use in testing, I created "build action" = "content" and "copy out output direct "=" Copy always "but he is not doing what I thought it would have to do. I thought it would make a copy of the content, but when my tests go, they say that the file does not exist.
I would not like to solve this by putting a clear path, because these paths will vary from developer machine to developer machine.
I tried to add the following as a pre-build event and also as a post-build event, but it did not solve my problem
If I see a previous or post build event that the data has been copied over to my Outreader, but this test is not being created in the results folder, Where the resource folder should be copied for the test to test.
Get the best runner Copy the assembly assemblies to some temporary folder. Copy of those resource files Instead of making them, consider adding them as an embedded resource and then loading them into the assembly using Assembly.GetManifestResourceStream ().
Comments
Post a Comment