|
From: David Webster-J. <da...@pi...> - 2006-08-18 13:10:10
|
I'm upgrading our unit tests to NMock2 and have come across a bit of a
problem. If I try to mock and internal interface I get an access denied
error when I run the test. Here is some example code:
using NMock2;
using NUnit.Framework;
namespace NMock2Test
{
internal interface IInternalInterface
{
void DoNothing();
}
[TestFixture]
public class Class1
{
[Test]
public void Test()
{
Mockery mocks = new Mockery();
IInternalInterface mockInterface =
mocks.NewMock<IInternalInterface>();
}
}
}
Is there anyway to get around this (maybe make NMock2 a friend assembly,
however you do that..)? I don't want to start making internal interfaces
public.
Thanks
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
|