考虑这个课程:
@interface SampleClass : NSObject { NSMutableArray *_childs; } - (void)addChild:(ChildClass *)child; - (void)removeChild:(ChildClass *)child; @end
如果_childs数组包含一个对象而没有添加属性来访问它,我如何测试添加子项时(因为我不希望允许客户端代码访问_childs数组)?