-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
121 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
99 changes: 99 additions & 0 deletions
99
...S3StoragePluginTests/Support/Internal/AWSS3StorageOperations+StorageServiceProvider.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
// | ||
// Copyright Amazon.com Inc. or its affiliates. | ||
// All Rights Reserved. | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
@testable import Amplify | ||
@testable import AWSPluginsCore | ||
@testable import AWSS3StoragePlugin | ||
import Foundation | ||
|
||
extension AWSS3StorageDownloadFileOperation { | ||
convenience init( | ||
_ request: StorageDownloadFileRequest, | ||
storageConfiguration: AWSS3StoragePluginConfiguration, | ||
storageService: AWSS3StorageServiceBehavior, | ||
authService: AWSAuthServiceBehavior, | ||
progressListener: InProcessListener? = nil, | ||
resultListener: ResultListener? = nil | ||
) { | ||
self.init( | ||
request, | ||
storageConfiguration: storageConfiguration, | ||
storageServiceProvider: { | ||
return storageService | ||
}, | ||
authService: authService, | ||
progressListener: progressListener, | ||
resultListener: resultListener | ||
) | ||
} | ||
} | ||
|
||
extension AWSS3StorageDownloadDataOperation { | ||
convenience init( | ||
_ request: StorageDownloadDataRequest, | ||
storageConfiguration: AWSS3StoragePluginConfiguration, | ||
storageService: AWSS3StorageServiceBehavior, | ||
authService: AWSAuthServiceBehavior, | ||
progressListener: InProcessListener? = nil, | ||
resultListener: ResultListener? = nil | ||
) { | ||
self.init( | ||
request, | ||
storageConfiguration: storageConfiguration, | ||
storageServiceProvider: { | ||
return storageService | ||
}, | ||
authService: authService, | ||
progressListener: progressListener, | ||
resultListener: resultListener | ||
) | ||
} | ||
} | ||
|
||
extension AWSS3StorageUploadDataOperation { | ||
convenience init( | ||
_ request: StorageUploadDataRequest, | ||
storageConfiguration: AWSS3StoragePluginConfiguration, | ||
storageService: AWSS3StorageServiceBehavior, | ||
authService: AWSAuthServiceBehavior, | ||
progressListener: InProcessListener? = nil, | ||
resultListener: ResultListener? = nil | ||
) { | ||
self.init( | ||
request, | ||
storageConfiguration: storageConfiguration, | ||
storageServiceProvider: { | ||
return storageService | ||
}, | ||
authService: authService, | ||
progressListener: progressListener, | ||
resultListener: resultListener | ||
) | ||
} | ||
} | ||
|
||
extension AWSS3StorageUploadFileOperation { | ||
convenience init( | ||
_ request: StorageUploadFileRequest, | ||
storageConfiguration: AWSS3StoragePluginConfiguration, | ||
storageService: AWSS3StorageServiceBehavior, | ||
authService: AWSAuthServiceBehavior, | ||
progressListener: InProcessListener? = nil, | ||
resultListener: ResultListener? = nil | ||
) { | ||
self.init( | ||
request, | ||
storageConfiguration: storageConfiguration, | ||
storageServiceProvider: { | ||
return storageService | ||
}, | ||
authService: authService, | ||
progressListener: progressListener, | ||
resultListener: resultListener | ||
) | ||
} | ||
} |