A Networking Manager with Alamofire

Can you fully test this? YES WE CAN

Photo by Jesse Roberts on Unsplash

Prerequisites:

What the project is, and what it isn’t

The motivation

Click for Gist

The approach

The Alamofire dependency

The Alamofire router

Click for Gist
Click for Gist
Click for Gist
Click for Gist

The overall strategy

The implementation

The Network Manager

Click for Gist

Testing

Click for Gist

The ViewController

Click for Gist

Testing

The URLProtocolMock

Click for Gist
Click for Gist

Back to testing

Click for Gist
Click for Gist

Conclusion

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store