I have this piece of code in my Product code.
string cwd = System.Web.Hosting.HostingEnvironment.ApplicationPhysicalPath;
Directory.SetCurrentDirectory(cwd);
When i try to execute this logic in UnitTest i get NullReferenceException since cwd is null.
Can someone help me on what changes should i make to my product code so that it is unit testable?
Aucun commentaire:
Enregistrer un commentaire