S01E20: [TDD π 17] Testing Presenters in Swift pt.1
/In this episode, we test-drive the ResultsPresenter
implementation.
The Presenter layerβs responsibility is to map game models to presentable models that are formatted and ready to be rendered by the views. This is a simple and elegant solution to remove formatting responsibilities from views and controllers, keeping the classes clean and short. Thatβs the essence of the Single Responsibility Principle, the S in SOLID.
Itβs important to mention that since we want to deploy this game in multiple platforms, the Presenter layer doesnβt know about UIKit, so it can be reused in other platforms such as macOS and watchOS.
Watch it now and see how easy it is to test-drive this approach. Red-green-refactor. Red-green-refactor. Red-green-refactor!
Subscribe now to our Youtube channel and catch free new episodes every week and follow along the project's progress on GitHub.