Sample of NUnit.Mock

using NUnit.Framework;
using NUnit.Mocks;

namespace ConsoleApplication1
{
[TestFixture]
public class Class1
{
public interface IExecutable
{
void Execute();
}

[Test]
public void ThisIsATest()
{
// This is not a good test of a mock but it shows how it works.
// The mock should be a Dependend Upon Component not the Subject Of Test
DynamicMock mockExecute = new DynamicMock(typeof(IExecutable));
mockExecute.Expect(“Execute”);
((IExecutable)mockExecute.MockInstance).Execute();
mockExecute.Verify();
}
}
}