This is more a reminder to myself, but I hope it’s useful to others. If you’re using xunit for unit testing and Moles for isolation/mocking then you may run into a problem using the moles test runner, whereby you receive an error stating “error: missing filename”.
For example, consider the following in the build file:
moles.runner /x86 /runner:"d:\tools\xunit\xunit.console.clr4.x86.exe" "d:\project\foo.dll" /args:"xml d:\project\foo.xml"
While a similar command works at the command line, in the runner it fails. The answer, as supplied by Heather, is to supply the arguments separately:
moles.runner /x86 /runner:"d:\tools\xunit\xunit.console.clr4.x86.exe" "d:\project\foo.dll" /args:"xml" /args:"d:\project\foo.xml"