Finally found a way to do what I wanted using NUnitLite.
- Added the following environment variables to my system in order to enable Typemock profiler.
Cor_Enable_Profiling=0×1
COR_PROFILER={B146457E-9AED-4624-B1E5-968D274416EC}
(NUnitLite may have been running the test in another AppDomain, and so setting the environment variables through LINQPad did not enable the profiler; this may be circumvented if there's a switch to do so in NUnitLite, but I haven't researched.)
Put TypeMock.dll and Typemock.ArrangeActAssert.dll in Linqpad's plugins folder.
Create new query and add NUnitLite through Nuget. Add necessary namespaces.
Now the following should work.
void Main()
{
new NUnitLite.Runner.TextUI().Execute( new[]{"-noheader"} );
}
// Define other methods and classes here
[Test, Isolated]
public void TestMock()
{
Isolate.WhenCalled( () => DateTime.Now ).WillReturn( DateTime.Today );
var dt = DateTime.Now;
Assert.AreEqual( DateTime.Today, dt );
}
Now my life should be considerably easier. Thanks!