I love LINQPad and use it daily. I have been trying to find a way to create and run ad-hoc tests with nunit and TypeMock in LINQPad for a while.
So I stumbled around and got some results, but some links are still missing.
Here's what I have done:
Create a new query in linqpad, add reference to NUnit and Typemock assemblies.
Create an Nunit runner. (Thanks to http://www.paraesthesia.com/archive/2008/02/21/template-for-quick-typemock-testing.aspx)
Add a couple of environment variables to enable Typemock profiler.
At this point, I am able to get Nunit and Typemock to work with some manual step (need to copy nunit and typemock dlls to the executing directory, e.g., \AppData\Local\Temp\1\LINQPad\skbidgcw).
But if I add our assemblies (which I want to test) to the LINQPad script, the test would fail, due to NUnit unable to find the assemblies in the executing directory. I even tried copying all the DLLs to that, but this would also fail due to:
System.IO.FileNotFoundException : Could not load file or assembly 'LINQPad, Version=1.0.0.0, Culture=neutral, PublicKeyToken=21353812cd2a2db5' or one of its dependencies. The system cannot find the file specified.
My linqpad query is here: http://pastebin.com/QtPNCv25
Any help will really be appreciated!
As a side note, I also tried using NUnitLite, while it runs Nunit tests beautifully, I can't find a way to make it work with Typemock, it throws error saying "Typemock Isolator needs to be linked with Coverage Tool to run".