Always the default implementation of protocol gets called even after implementing the method in class extension in an XCTest file
问题 I have a protocol protocol SomeProtocol { func method() } and its implementation extension SomeProtocol {func method(){--implementation--}} In build target i have a class confirming to this protocol class SomeClass: SomeProtocol { func doSomething() { method() } } What i want is i want to have a different implementation of the protocol method in my test target, in my XCTest file. For that what i did was i extended the SomeClass and wrote my implementation there. extension SomeClass {func