var mySubstitute = Substitute.For<IMySubstitute>();
mySubstitute.DoSomething(Arg.Any<bool>(), Arg.Any<string>())
.Returns(new TestObject(default(string), default(bool), aValueIWantToControle));
我有一个MRC objective-c文件,它声明了一个弱委托,
Message *m = [msg retain];
dispatch_queue_t queue = _handle_queue;
__block id delegate = self.protocol_delegate;
dispatch_async(queue, ^{
if (delegate && [delegate respondsToSelector:@selector(onReceive:)]) {
[delegate onReceive:m];
}
});
如果委托被释放,委托是否会重置为nil?