Approach to unit testing interaction with a base class
问题 There seems to be three general patterns for testing the way a derived class interacts with it's base 1 . I don't really like any of them, for the reasons I've listed below. Has anyone had long term success with one of these (or another) methods for testing base class interaction? Change the access modifiers to allow Friend ( internal in C#) access and set InternalsVisibleTo to include the mocking framework / unit test assembly Changing the SUT to allow for testing is a test smell . If the