Is there a way to exclude recording for properties in the recording block ? Or exclude a type from mocking like CLR types are excluded ?
Let's say test class is TestClass and not to be mocked class is NotMockedClass.
class NotMockedClass
{
public string DontMockProperty { get; }
}
class TestClass
{
public int TestMethod(
}
[Test, VerifyMock]
public TestCase()
{
NotMockedClass nmObject = new NotMockedClass();
TestClass testObject = new TestClass();
using (RecordExpectations recorder = RecorderManager.StartRecording())
{
recorder.ExpectAndReturn(testObject.TestMethod(nmObject.DontMockProperty), 4);
}
}
I don't want nmObject.DontMockProperty don't be mocked or set expectation.