Closed timkimadobe closed 1 year ago
Merging #414 (bb6eb1d) into dev (2053d90) will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## dev #414 +/- ##
=======================================
Coverage 96.77% 96.77%
=======================================
Files 27 27
Lines 1671 1671
=======================================
Hits 1617 1617
Misses 54 54
Description
This PR refactors the
NetworkRequestHelper
'snetworkResponses
data struct to use a 1:many relationship between network requests and responses. This is to support more complex use cases that would rely on multiple requests to the same endpoint.[TestableNetworkRequest: HttpConnection]
[TestableNetworkRequest: [HttpConnection]]
Also adds a new method in the
NetworkRequestHelper
:removeAllResponses(for networkRequest: NetworkRequest)
Which allows the MockNetworkRequest to maintain the 1:1 network request to response behavior via its own methods to set mock network responses.Question for reviewers
removeAllResponses(for:)
:MockNetworkService
's API contract to set 1:1 network request to mock responseRelated Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: