Normally when I write tests I test against the int...
# ios
m
Normally when I write tests I test against the interface rather than the implementation. However in Swift because of the PAT’s it seems I can’t do that now? Is it true? I can only test against the implementation now? What is the best practice here?
s
PAT?
m
It’s an acronym for Protocol with associated type. When the protocol has an associated type you’re not able to create a variable of the protocol and can only use the protocol as a generic constraint. https://stackoverflow.com/questions/36348061/protocol-can-only-be-used-as-a-generic-constraint-because-it-has-self-or-associa
it seems even without an associated type you can’t create a variable of the protocol in tests. It’s not a big deal I just wondered if there was a way to do it.