在 FeedbackTarget.h 中:
@protocol FeedbackTarget <NSObject>
@property (nonatomic, retain) Feedback *feedback;
- (void)someMethod;
@end
在 FeedbackViewControllerTests.m 中:
#import "FeedbackTarget.h"
...
- (void)setUp
{
[super setUp];
self.feedbackTarget = [OCMockObject mockForProtocol:FeedbackTarget];
}
为什么我会收到错误:使用未声明的标识符“FeedbackTarget”?