c# - Directory.CreateDirectory from [TestMethod] behaves strangely -
i'm in dark on one... i've created batch processing code, , have several tests setup directory structure before calling method tested. problem can illustrated by
[testmethod] public void stupidtest() { directory.createdirectory("./xxx"); assert.istrue(directory.exists("./xxx")); //new fileinfo( "./xxx/yyy.txt").create().close(); }
when last line commented out, tests runs perfectly, in "out" folder of testresults, no folder created. when last line included, test runs well, , both xxx folder , yyy.txt file exist in "out" folder test run. if last line of test included in body, test fails, complaining non-existant path.
i found references mentioning file system virtualization, , test app not having enough permissions create folders in "out" folder.
any appreciated!
can try , use processmonitor (from ms download site,free), , record of activities of process, , can see if directory gets created, moved , deleted , on.
Comments
Post a Comment