aws-sdk-ios
aws-sdk-ios copied to clipboard
XCTesting AWSApiGatewayClient - making session a public property
Which AWS Services is the feature request for? AWSApiGatewayClient
Is your feature request related to a problem? Please describe. Attempting to run unit and e2e tests against the application, using XCTest and XCUITest. A common practice is to mock the URLSession, and then return the expected response for the test.
See examples: https://www.alfianlosari.com/posts/tdd-ios-network-api-call-with-xctest/ https://www.swiftbysundell.com/articles/mocking-in-swift/
Currently URLSession is a private property https://github.com/aws-amplify/aws-sdk-ios/blob/main/AWSAPIGateway/AWSAPIGatewayClient.m#L33
Describe the solution you'd like Make session a nullable property of AWSAPIGatewayClient
Describe alternatives you've considered Using 3rd party mock HTTP frameworks: OHHTTPStubs, Mockingjay, Hippolyte
This issue is stale because it has been open for 14 days with no activity. Please, provide an update or it will be automatically closed in 7 days.
Please keep this issue open.
This issue is stale because it has been open for 14 days with no activity. Please, provide an update or it will be automatically closed in 7 days.