I'm trying to test the functionality of a class in my (ASP.Net) web application, using unit tests. This class loads some files from the hard drive (to perform xsl transformations):
Xsl = GetXSLFromFile(AppDomain.CurrentDomain.BaseDirectory + "\XML Transformationen\Transformation_01.xslt")
This path is correctly resolved during debugging of the web application itself. But whenever I start the unit test (which resides in a separate testing project, referencing the project of the web application), I get the path of the testing project instead.
Is it possible to get the path of the web application in this scenario, or do I have to use a different approach? Any hints are appreciated.