Skip to content

Latest commit

 

History

History
28 lines (16 loc) · 769 Bytes

README.markdown

File metadata and controls

28 lines (16 loc) · 769 Bytes

NetworkUnitTestDemo

Purpose

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.

Usage

Open the project using Xcode then run the ExampleNetworkClientTests unit test suite.

Compatibility

  • Xcode 11.5
  • Swift 5
  • macOS 10.15.5
  • iOS Simulator 13.5

Author

Copyright © Sasmito Adibowo
https://cutecoder.org

License

Apache 2.0 license. See file LICENSE.txt for more information.