C
colinjack
Hi All,
Not sure if this is the correct forum for this but I cant seem to find
a more specific one for NMock...
I'm trying to use the dynamic mocking functionality of NMock and,
whilst its great, I've run into a problem. Say intefaceA derives from
interfaceB and so gets interfaceB's members:
public interfaceA : intefaceB
{
...
}
public interfaceB
{
public bool Blah { get; }
}
Ok now I want to create a dynamic mock for interfaceA:
DynamicMock dynamicMockInfo = new DynamicMock(typeof(interfaceA));
dynamicMockInfo.SetupResult("Blah", true, new Type[0]);
Thing is it fails with a NullReferenceException in nmock.dll, and will
only work if I also put the Blah property into interfaceA. Anyone got
any idea how I resolve this?
Ta,
Colin
Not sure if this is the correct forum for this but I cant seem to find
a more specific one for NMock...
I'm trying to use the dynamic mocking functionality of NMock and,
whilst its great, I've run into a problem. Say intefaceA derives from
interfaceB and so gets interfaceB's members:
public interfaceA : intefaceB
{
...
}
public interfaceB
{
public bool Blah { get; }
}
Ok now I want to create a dynamic mock for interfaceA:
DynamicMock dynamicMockInfo = new DynamicMock(typeof(interfaceA));
dynamicMockInfo.SetupResult("Blah", true, new Type[0]);
Thing is it fails with a NullReferenceException in nmock.dll, and will
only work if I also put the Blah property into interfaceA. Anyone got
any idea how I resolve this?
Ta,
Colin