I have added a NUnit test project to a project in order to make unit test
My main project is in
C:\Users\myName\Desktop\0120-project\ProjectName\
Unit test project is in :
C:\Users\myName\Desktop\0120-project\ProjectNameTest\
Now when I'm debugging a unit test :
[Test]
public void ExportationTest()
{
var evan= System.Environment.CurrentDirectory;
//...
}
the returned value of evan
is :
C:\Users\myName\AppData\Local\JetBrains\ReSharperPlatformVs12
how is that even possible?! I'm not even launching the project from there. I'm using visual studio 2013 environement .
From the documentation:
Environment.CurrentDirectory Property
Gets or sets the fully qualified path of the current working directory.
It looks like you are using ReSharper to launch your tests, which is probably setting the working directory to that location.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With