|
From: Alexey K. <ak...@ho...> - 2004-08-26 01:41:20
|
<html><div style='background-color:'><DIV class=RTE> <DIV class=RTE>Hi All,</DIV> <DIV class=RTE> </DIV> <DIV class=RTE>I am new to NMock and have a basic question. Is mocking private/internal class supported by NMock? It doesn't work for me, I get MemberAccessException for the class ctor. I looked at the code and as far as I understand the mock class is created in a dynamic assembly and derived from the specified class. So in order for this to work the mocked class needs to be public.</DIV> <DIV class=RTE> </DIV> <DIV class=RTE>Is there any way around it? What is the preferred method of mocking private classes using NMock?</DIV> <DIV class=RTE> </DIV> <DIV class=RTE>Thanks,</DIV> <DIV class=RTE>Alexey</DIV></DIV></div></html> |