Closed timkimadobe closed 1 year ago
Merging #405 (06a183f) into dev (285aeb9) will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## dev #405 +/- ##
=======================================
Coverage 96.77% 96.77%
=======================================
Files 27 27
Lines 1671 1671
=======================================
Hits 1617 1617
Misses 54 54
Description
This PR:
RealNetworkService
getResponse
method to not include an await in the logic, instead returning results immediately, and relying onassertAllNetworkRequestExpectations
to perform awaitsMock
/RealNetworkService
, a lot of the redundant networkRequest method and param names can probably be omitted without affecting clarity of intent.MockNetworkService
getMockResponseFor(networkRequest:)
getMockResponse(for:)
setMockResponseFor(networkRequest:responseConnection:)
setMockResponse(for:responseConnection:)
setMockResponseFor(url:httpMethod:responseConnection:)
setMockResponse(url:httpMethod:responseConnection:)
NetworkRequestHelper
getSentNetworkRequestsMatching(networkRequest:)
getSentRequests(matching:)
setResponseFor(networkRequest:responseConnection:)
setResponse(for:responseConnection:)
getResponseFor(networkRequest:)
getResponse(for:)
setExpectationForNetworkRequest(networkRequest:...)
setExpectation(for:...)
timeout
expectationTimeout
getNetworkRequestsWith
andawaitRequest
parametertimeout
->expectationTimeout
(as this timeout only applies if there is already an expectation set on the network request, if there is no expectation this timeout value is not used and the default timeout is used instead)RealNetworkService
getResponseFor(networkRequest:timeout:)
getResponse(for:)
setExpectationForNetworkRequest(networkRequest:...)
setExpectation(for:...)
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: