Ive started work on a product that uses license files. These files must be read (and verified) for the application to work. This causes some problems in unit tests, without the right license they throw exceptions.
We are using NUnit and I need to do the following:
- Copy the license file to the copied shadow directory before running the test.
- Set the working directory to the original output folder so that the file names are still valid in the temporary folder of the test.
I know that in unit tests you should generally avoid accessing files, but before starting refactoring we need unit tests, so I need this to work.
source
share