In order to write UITests it would be advantageous to use custom protocol classes for the url session you use (i.e. for Mocker or similar tools). Currently, this is not possible because you aren't using the shared url session but create a custom one for every SendStep.
There are two ways this could be solved:
Use the shared url session. You only set the timeoutIntervalForResource property on the url session configuration and you also set the timeoutInterval on the URLRequest itself which is redundant (the url session has a timer for the max time any bytes are received, the url request's timer is for the overall request time. If they are the same value the url requests timer is sufficient).
Allow injecting custom protocol classes and use those when creating a custom session. This would still give you the possibility to have a custom url session and tweak some properties in the future.
In order to write UITests it would be advantageous to use custom protocol classes for the url session you use (i.e. for Mocker or similar tools). Currently, this is not possible because you aren't using the shared url session but create a custom one for every SendStep.
There are two ways this could be solved:
timeoutIntervalForResource
property on the url session configuration and you also set thetimeoutInterval
on the URLRequest itself which is redundant (the url session has a timer for the max time any bytes are received, the url request's timer is for the overall request time. If they are the same value the url requests timer is sufficient).I created two PRs for the proposed solutions: