To test swift objects, from what I've read, we sub-class them and mock the methods we want return our test values. I then watched a WWDC video about swift performance and the presenters suggested marking classes as final to help the compiler decide how to call methods and from the example I saw adding final can help.
The issues I'm having how can we mark classes as final but still enable sub-class mocking? Has anyone actually run into this problem or should I drop the final keyword from my declaration?
Any suggestions would be awesome or if there are none tell me I'm not doing it right.
Thanks, Mike.
Aucun commentaire:
Enregistrer un commentaire