I'm using OCMProtocolMock to mock a protocol. After some clean up, my object conforms to 3 protocols:
id<MyProtocolA, MyProtocolB, MyProtocolC>
OCMProtocolMock takes only 1 arg, so I'd like to make a typedef of my new, composed object to pass to OCMProtocolMock.
Something like:
typedef id<MyProtocolA, MyProtocolB, MyProtocolC> CombinedProtocol;
id<CombinedProtocol> _myCombinedObject = OCMProtocolMock(@protocol(CombinedProtocol));
But that's throwing compiler error saying that it cannot find the protocol declaration for 'CombinedProtocol'.
Any ideas? Thanks!
A possible solution is to just define a protocol that conforms to all the others.
And just use that like so
And ignore the typedef entirely