Mock a method without mocking a class first
问题 I am using moq4 for mocking things in my UnitTests . I have a class say TestClass in which a method called TestMethod is their that i wanted to test. So my problem is my TestMethod requires a check on testlist that is in my TestClass. Like this:- public Class TestClass { public readonly ISomeService _someService; public bool TestProperty { get; private set; } public List<string> testlist { get; private set; } Public TestClass(ISomeService someService) { _someService = someService; } public