aws-sdk-ios icon indicating copy to clipboard operation
aws-sdk-ios copied to clipboard

XCTesting AWSApiGatewayClient - making session a public property

Open danquack opened this issue 4 years ago • 3 comments

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

danquack avatar Jan 02 '21 19:01 danquack

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.

github-actions[bot] avatar Jun 29 '21 00:06 github-actions[bot]

Please keep this issue open.

danquack avatar Jun 29 '21 00:06 danquack

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.

github-actions[bot] avatar Jul 15 '21 00:07 github-actions[bot]