Demonstrates how to create unit tests of network client code. The test revolves around a subclass of URLProtocol
which plugs into Foundation’s URL Loading System to mock backend responses.
Refer to this project's article How to Unit Test Network Code in Swift for details.
Open the project using Xcode then run the ExampleNetworkClientTests
unit test suite.
- Xcode 11.5
- Swift 5
- macOS 10.15.5
- iOS Simulator 13.5
Copyright © Sasmito Adibowo
https://cutecoder.org
Apache 2.0 license. See file LICENSE.txt
for more information.