Skip to content

Commit

Permalink
Parameter Encoding Tests (#2)
Browse files Browse the repository at this point in the history
* add mockingjay pod

* add some basic url tests

* switch url qualifying to try/catch

* fix url tests

* add some more tests around GET/POST request parameter encoding

* changed NetworkAPI.Error into NetworkAPIError
simplified some try/catch logic
add unknownError type
switch requestFailed error type from String to Error
moved NetworkAPIError: Equatable into tests, fixed tests

* address PR issues:
add anyDecodableType to remove restriction on GET params being [String: String]
changed passing an empty object for get param encoding from an error to just carrying on
simplifyed some try/catch blocks.

* Fixed get param encoding to use NSJSONSerialization, better handling of unpermitted types
Add some more tests, refined current tests
removed unused debugging prints

* Fixed get param encoding to use NSJSONSerialization, better handling of unpermitted types
Add some more tests, refined current tests
removed unused debugging prints
  • Loading branch information
brendanlensink authored Nov 16, 2018
1 parent 0f59840 commit 190c085
Show file tree
Hide file tree
Showing 40 changed files with 2,809 additions and 234 deletions.
4 changes: 0 additions & 4 deletions SCNetworkAPI/.swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ large_tuple:
warning: 3
error: 4

identifier_name:
excluded:
- id

opt_in_rules:
- closure_end_indentation
- closure_spacing
Expand Down
1 change: 1 addition & 0 deletions SCNetworkAPI/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ target 'SCNetworkAPIMobile' do
target 'SCNetworkAPIMobileTests' do
inherit! :search_paths
# Pods for testing
pod 'Mockingjay'
end

end
Expand Down
15 changes: 14 additions & 1 deletion SCNetworkAPI/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,16 +1,29 @@
PODS:
- Mockingjay (2.0.1):
- Mockingjay/Core (= 2.0.1)
- Mockingjay/XCTest (= 2.0.1)
- Mockingjay/Core (2.0.1):
- URITemplate (~> 2.0)
- Mockingjay/XCTest (2.0.1):
- Mockingjay/Core
- SwiftLint (0.27.0)
- URITemplate (2.0.3)

DEPENDENCIES:
- Mockingjay
- SwiftLint

SPEC REPOS:
https://github.com/cocoapods/specs.git:
- Mockingjay
- SwiftLint
- URITemplate

SPEC CHECKSUMS:
Mockingjay: 11a621880d2887f1775bdcf824341eb68f218450
SwiftLint: 3207c1faa2240bf8973b191820a116113cd11073
URITemplate: ace0c4c46dcf8afe6e89b4060621852886b15c3b

PODFILE CHECKSUM: 14e9088553906abf7cbce21103eabce7b7c484fd
PODFILE CHECKSUM: cc186c01e2769e11750042d767aeb6f6086b5d1e

COCOAPODS: 1.5.3
15 changes: 14 additions & 1 deletion SCNetworkAPI/Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions SCNetworkAPI/Pods/Mockingjay/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

120 changes: 120 additions & 0 deletions SCNetworkAPI/Pods/Mockingjay/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 48 additions & 0 deletions SCNetworkAPI/Pods/Mockingjay/Sources/Mockingjay/Builders.swift

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

80 changes: 80 additions & 0 deletions SCNetworkAPI/Pods/Mockingjay/Sources/Mockingjay/Matchers.swift

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions SCNetworkAPI/Pods/Mockingjay/Sources/Mockingjay/Mockingjay.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 190c085

Please sign in to comment.