// // Copyright 2010-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"). // You may not use this file except in compliance with the License. // A copy of the License is located at // // http://aws.amazon.com/apache2.0 // // or in the "license" file accompanying this file. This file is distributed // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either // express or implied. See the License for the specific language governing // permissions and limitations under the License. // #import #import #import "OCMock.h" #import "AWSTestUtility.h" #import "AWSConnectService.h" static id mockNetworking = nil; @interface AWSGeneralConnectTests : XCTestCase @end @implementation AWSGeneralConnectTests - (void)setUp { [super setUp]; [AWSTestUtility setupFakeCognitoCredentialsProvider]; mockNetworking = OCMClassMock([AWSNetworking class]); AWSTask *errorTask = [AWSTask taskWithError:[NSError errorWithDomain:@"OCMockExpectedNetworkingError" code:8848 userInfo:nil]]; OCMStub([mockNetworking sendRequest:[OCMArg isKindOfClass:[AWSNetworkingRequest class]]]).andReturn(errorTask); } - (void)tearDown { [super tearDown]; } - (void)testConstructors { NSString *key = @"testConnectConstructors"; XCTAssertNotNil([AWSConnect defaultConnect]); XCTAssertEqual([[AWSConnect defaultConnect] class], [AWSConnect class]); XCTAssertNil([AWSConnect ConnectForKey:key]); AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionSAEast1 credentialsProvider:[AWSServiceManager defaultServiceManager].defaultServiceConfiguration.credentialsProvider]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; XCTAssertNotNil([AWSConnect ConnectForKey:key]); XCTAssertEqual([[AWSConnect ConnectForKey:key] class], [AWSConnect class]); XCTAssertEqual([AWSConnect ConnectForKey:key].configuration.regionType, AWSRegionSAEast1); [AWSConnect removeConnectForKey:key]; XCTAssertNil([AWSConnect ConnectForKey:key]); } - (void)testActivateEvaluationForm { NSString *key = @"testActivateEvaluationForm"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] activateEvaluationForm:[AWSConnectActivateEvaluationFormRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testActivateEvaluationFormCompletionHandler { NSString *key = @"testActivateEvaluationForm"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] activateEvaluationForm:[AWSConnectActivateEvaluationFormRequest new] completionHandler:^(AWSConnectActivateEvaluationFormResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testAssociateApprovedOrigin { NSString *key = @"testAssociateApprovedOrigin"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] associateApprovedOrigin:[AWSConnectAssociateApprovedOriginRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testAssociateApprovedOriginCompletionHandler { NSString *key = @"testAssociateApprovedOrigin"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] associateApprovedOrigin:[AWSConnectAssociateApprovedOriginRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testAssociateBot { NSString *key = @"testAssociateBot"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] associateBot:[AWSConnectAssociateBotRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testAssociateBotCompletionHandler { NSString *key = @"testAssociateBot"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] associateBot:[AWSConnectAssociateBotRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testAssociateDefaultVocabulary { NSString *key = @"testAssociateDefaultVocabulary"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] associateDefaultVocabulary:[AWSConnectAssociateDefaultVocabularyRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testAssociateDefaultVocabularyCompletionHandler { NSString *key = @"testAssociateDefaultVocabulary"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] associateDefaultVocabulary:[AWSConnectAssociateDefaultVocabularyRequest new] completionHandler:^(AWSConnectAssociateDefaultVocabularyResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testAssociateInstanceStorageConfig { NSString *key = @"testAssociateInstanceStorageConfig"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] associateInstanceStorageConfig:[AWSConnectAssociateInstanceStorageConfigRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testAssociateInstanceStorageConfigCompletionHandler { NSString *key = @"testAssociateInstanceStorageConfig"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] associateInstanceStorageConfig:[AWSConnectAssociateInstanceStorageConfigRequest new] completionHandler:^(AWSConnectAssociateInstanceStorageConfigResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testAssociateLambdaFunction { NSString *key = @"testAssociateLambdaFunction"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] associateLambdaFunction:[AWSConnectAssociateLambdaFunctionRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testAssociateLambdaFunctionCompletionHandler { NSString *key = @"testAssociateLambdaFunction"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] associateLambdaFunction:[AWSConnectAssociateLambdaFunctionRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testAssociateLexBot { NSString *key = @"testAssociateLexBot"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] associateLexBot:[AWSConnectAssociateLexBotRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testAssociateLexBotCompletionHandler { NSString *key = @"testAssociateLexBot"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] associateLexBot:[AWSConnectAssociateLexBotRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testAssociatePhoneNumberContactFlow { NSString *key = @"testAssociatePhoneNumberContactFlow"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] associatePhoneNumberContactFlow:[AWSConnectAssociatePhoneNumberContactFlowRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testAssociatePhoneNumberContactFlowCompletionHandler { NSString *key = @"testAssociatePhoneNumberContactFlow"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] associatePhoneNumberContactFlow:[AWSConnectAssociatePhoneNumberContactFlowRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testAssociateQueueQuickConnects { NSString *key = @"testAssociateQueueQuickConnects"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] associateQueueQuickConnects:[AWSConnectAssociateQueueQuickConnectsRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testAssociateQueueQuickConnectsCompletionHandler { NSString *key = @"testAssociateQueueQuickConnects"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] associateQueueQuickConnects:[AWSConnectAssociateQueueQuickConnectsRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testAssociateRoutingProfileQueues { NSString *key = @"testAssociateRoutingProfileQueues"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] associateRoutingProfileQueues:[AWSConnectAssociateRoutingProfileQueuesRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testAssociateRoutingProfileQueuesCompletionHandler { NSString *key = @"testAssociateRoutingProfileQueues"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] associateRoutingProfileQueues:[AWSConnectAssociateRoutingProfileQueuesRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testAssociateSecurityKey { NSString *key = @"testAssociateSecurityKey"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] associateSecurityKey:[AWSConnectAssociateSecurityKeyRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testAssociateSecurityKeyCompletionHandler { NSString *key = @"testAssociateSecurityKey"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] associateSecurityKey:[AWSConnectAssociateSecurityKeyRequest new] completionHandler:^(AWSConnectAssociateSecurityKeyResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testClaimPhoneNumber { NSString *key = @"testClaimPhoneNumber"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] claimPhoneNumber:[AWSConnectClaimPhoneNumberRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testClaimPhoneNumberCompletionHandler { NSString *key = @"testClaimPhoneNumber"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] claimPhoneNumber:[AWSConnectClaimPhoneNumberRequest new] completionHandler:^(AWSConnectClaimPhoneNumberResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testCreateAgentStatus { NSString *key = @"testCreateAgentStatus"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] createAgentStatus:[AWSConnectCreateAgentStatusRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testCreateAgentStatusCompletionHandler { NSString *key = @"testCreateAgentStatus"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] createAgentStatus:[AWSConnectCreateAgentStatusRequest new] completionHandler:^(AWSConnectCreateAgentStatusResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testCreateContactFlow { NSString *key = @"testCreateContactFlow"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] createContactFlow:[AWSConnectCreateContactFlowRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testCreateContactFlowCompletionHandler { NSString *key = @"testCreateContactFlow"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] createContactFlow:[AWSConnectCreateContactFlowRequest new] completionHandler:^(AWSConnectCreateContactFlowResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testCreateContactFlowModule { NSString *key = @"testCreateContactFlowModule"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] createContactFlowModule:[AWSConnectCreateContactFlowModuleRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testCreateContactFlowModuleCompletionHandler { NSString *key = @"testCreateContactFlowModule"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] createContactFlowModule:[AWSConnectCreateContactFlowModuleRequest new] completionHandler:^(AWSConnectCreateContactFlowModuleResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testCreateEvaluationForm { NSString *key = @"testCreateEvaluationForm"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] createEvaluationForm:[AWSConnectCreateEvaluationFormRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testCreateEvaluationFormCompletionHandler { NSString *key = @"testCreateEvaluationForm"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] createEvaluationForm:[AWSConnectCreateEvaluationFormRequest new] completionHandler:^(AWSConnectCreateEvaluationFormResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testCreateHoursOfOperation { NSString *key = @"testCreateHoursOfOperation"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] createHoursOfOperation:[AWSConnectCreateHoursOfOperationRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testCreateHoursOfOperationCompletionHandler { NSString *key = @"testCreateHoursOfOperation"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] createHoursOfOperation:[AWSConnectCreateHoursOfOperationRequest new] completionHandler:^(AWSConnectCreateHoursOfOperationResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testCreateInstance { NSString *key = @"testCreateInstance"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] createInstance:[AWSConnectCreateInstanceRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testCreateInstanceCompletionHandler { NSString *key = @"testCreateInstance"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] createInstance:[AWSConnectCreateInstanceRequest new] completionHandler:^(AWSConnectCreateInstanceResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testCreateIntegrationAssociation { NSString *key = @"testCreateIntegrationAssociation"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] createIntegrationAssociation:[AWSConnectCreateIntegrationAssociationRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testCreateIntegrationAssociationCompletionHandler { NSString *key = @"testCreateIntegrationAssociation"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] createIntegrationAssociation:[AWSConnectCreateIntegrationAssociationRequest new] completionHandler:^(AWSConnectCreateIntegrationAssociationResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testCreateParticipant { NSString *key = @"testCreateParticipant"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] createParticipant:[AWSConnectCreateParticipantRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testCreateParticipantCompletionHandler { NSString *key = @"testCreateParticipant"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] createParticipant:[AWSConnectCreateParticipantRequest new] completionHandler:^(AWSConnectCreateParticipantResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testCreatePrompt { NSString *key = @"testCreatePrompt"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] createPrompt:[AWSConnectCreatePromptRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testCreatePromptCompletionHandler { NSString *key = @"testCreatePrompt"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] createPrompt:[AWSConnectCreatePromptRequest new] completionHandler:^(AWSConnectCreatePromptResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testCreateQueue { NSString *key = @"testCreateQueue"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] createQueue:[AWSConnectCreateQueueRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testCreateQueueCompletionHandler { NSString *key = @"testCreateQueue"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] createQueue:[AWSConnectCreateQueueRequest new] completionHandler:^(AWSConnectCreateQueueResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testCreateQuickConnect { NSString *key = @"testCreateQuickConnect"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] createQuickConnect:[AWSConnectCreateQuickConnectRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testCreateQuickConnectCompletionHandler { NSString *key = @"testCreateQuickConnect"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] createQuickConnect:[AWSConnectCreateQuickConnectRequest new] completionHandler:^(AWSConnectCreateQuickConnectResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testCreateRoutingProfile { NSString *key = @"testCreateRoutingProfile"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] createRoutingProfile:[AWSConnectCreateRoutingProfileRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testCreateRoutingProfileCompletionHandler { NSString *key = @"testCreateRoutingProfile"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] createRoutingProfile:[AWSConnectCreateRoutingProfileRequest new] completionHandler:^(AWSConnectCreateRoutingProfileResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testCreateRule { NSString *key = @"testCreateRule"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] createRule:[AWSConnectCreateRuleRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testCreateRuleCompletionHandler { NSString *key = @"testCreateRule"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] createRule:[AWSConnectCreateRuleRequest new] completionHandler:^(AWSConnectCreateRuleResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testCreateSecurityProfile { NSString *key = @"testCreateSecurityProfile"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] createSecurityProfile:[AWSConnectCreateSecurityProfileRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testCreateSecurityProfileCompletionHandler { NSString *key = @"testCreateSecurityProfile"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] createSecurityProfile:[AWSConnectCreateSecurityProfileRequest new] completionHandler:^(AWSConnectCreateSecurityProfileResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testCreateTaskTemplate { NSString *key = @"testCreateTaskTemplate"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] createTaskTemplate:[AWSConnectCreateTaskTemplateRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testCreateTaskTemplateCompletionHandler { NSString *key = @"testCreateTaskTemplate"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] createTaskTemplate:[AWSConnectCreateTaskTemplateRequest new] completionHandler:^(AWSConnectCreateTaskTemplateResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testCreateTrafficDistributionGroup { NSString *key = @"testCreateTrafficDistributionGroup"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] createTrafficDistributionGroup:[AWSConnectCreateTrafficDistributionGroupRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testCreateTrafficDistributionGroupCompletionHandler { NSString *key = @"testCreateTrafficDistributionGroup"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] createTrafficDistributionGroup:[AWSConnectCreateTrafficDistributionGroupRequest new] completionHandler:^(AWSConnectCreateTrafficDistributionGroupResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testCreateUseCase { NSString *key = @"testCreateUseCase"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] createUseCase:[AWSConnectCreateUseCaseRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testCreateUseCaseCompletionHandler { NSString *key = @"testCreateUseCase"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] createUseCase:[AWSConnectCreateUseCaseRequest new] completionHandler:^(AWSConnectCreateUseCaseResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testCreateUser { NSString *key = @"testCreateUser"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] createUser:[AWSConnectCreateUserRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testCreateUserCompletionHandler { NSString *key = @"testCreateUser"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] createUser:[AWSConnectCreateUserRequest new] completionHandler:^(AWSConnectCreateUserResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testCreateUserHierarchyGroup { NSString *key = @"testCreateUserHierarchyGroup"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] createUserHierarchyGroup:[AWSConnectCreateUserHierarchyGroupRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testCreateUserHierarchyGroupCompletionHandler { NSString *key = @"testCreateUserHierarchyGroup"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] createUserHierarchyGroup:[AWSConnectCreateUserHierarchyGroupRequest new] completionHandler:^(AWSConnectCreateUserHierarchyGroupResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testCreateVocabulary { NSString *key = @"testCreateVocabulary"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] createVocabulary:[AWSConnectCreateVocabularyRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testCreateVocabularyCompletionHandler { NSString *key = @"testCreateVocabulary"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] createVocabulary:[AWSConnectCreateVocabularyRequest new] completionHandler:^(AWSConnectCreateVocabularyResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDeactivateEvaluationForm { NSString *key = @"testDeactivateEvaluationForm"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] deactivateEvaluationForm:[AWSConnectDeactivateEvaluationFormRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDeactivateEvaluationFormCompletionHandler { NSString *key = @"testDeactivateEvaluationForm"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] deactivateEvaluationForm:[AWSConnectDeactivateEvaluationFormRequest new] completionHandler:^(AWSConnectDeactivateEvaluationFormResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDeleteContactEvaluation { NSString *key = @"testDeleteContactEvaluation"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] deleteContactEvaluation:[AWSConnectDeleteContactEvaluationRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDeleteContactEvaluationCompletionHandler { NSString *key = @"testDeleteContactEvaluation"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] deleteContactEvaluation:[AWSConnectDeleteContactEvaluationRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDeleteContactFlow { NSString *key = @"testDeleteContactFlow"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] deleteContactFlow:[AWSConnectDeleteContactFlowRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDeleteContactFlowCompletionHandler { NSString *key = @"testDeleteContactFlow"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] deleteContactFlow:[AWSConnectDeleteContactFlowRequest new] completionHandler:^(AWSConnectDeleteContactFlowResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDeleteContactFlowModule { NSString *key = @"testDeleteContactFlowModule"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] deleteContactFlowModule:[AWSConnectDeleteContactFlowModuleRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDeleteContactFlowModuleCompletionHandler { NSString *key = @"testDeleteContactFlowModule"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] deleteContactFlowModule:[AWSConnectDeleteContactFlowModuleRequest new] completionHandler:^(AWSConnectDeleteContactFlowModuleResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDeleteEvaluationForm { NSString *key = @"testDeleteEvaluationForm"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] deleteEvaluationForm:[AWSConnectDeleteEvaluationFormRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDeleteEvaluationFormCompletionHandler { NSString *key = @"testDeleteEvaluationForm"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] deleteEvaluationForm:[AWSConnectDeleteEvaluationFormRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDeleteHoursOfOperation { NSString *key = @"testDeleteHoursOfOperation"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] deleteHoursOfOperation:[AWSConnectDeleteHoursOfOperationRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDeleteHoursOfOperationCompletionHandler { NSString *key = @"testDeleteHoursOfOperation"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] deleteHoursOfOperation:[AWSConnectDeleteHoursOfOperationRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDeleteInstance { NSString *key = @"testDeleteInstance"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] deleteInstance:[AWSConnectDeleteInstanceRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDeleteInstanceCompletionHandler { NSString *key = @"testDeleteInstance"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] deleteInstance:[AWSConnectDeleteInstanceRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDeleteIntegrationAssociation { NSString *key = @"testDeleteIntegrationAssociation"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] deleteIntegrationAssociation:[AWSConnectDeleteIntegrationAssociationRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDeleteIntegrationAssociationCompletionHandler { NSString *key = @"testDeleteIntegrationAssociation"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] deleteIntegrationAssociation:[AWSConnectDeleteIntegrationAssociationRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDeletePrompt { NSString *key = @"testDeletePrompt"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] deletePrompt:[AWSConnectDeletePromptRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDeletePromptCompletionHandler { NSString *key = @"testDeletePrompt"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] deletePrompt:[AWSConnectDeletePromptRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDeleteQueue { NSString *key = @"testDeleteQueue"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] deleteQueue:[AWSConnectDeleteQueueRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDeleteQueueCompletionHandler { NSString *key = @"testDeleteQueue"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] deleteQueue:[AWSConnectDeleteQueueRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDeleteQuickConnect { NSString *key = @"testDeleteQuickConnect"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] deleteQuickConnect:[AWSConnectDeleteQuickConnectRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDeleteQuickConnectCompletionHandler { NSString *key = @"testDeleteQuickConnect"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] deleteQuickConnect:[AWSConnectDeleteQuickConnectRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDeleteRoutingProfile { NSString *key = @"testDeleteRoutingProfile"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] deleteRoutingProfile:[AWSConnectDeleteRoutingProfileRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDeleteRoutingProfileCompletionHandler { NSString *key = @"testDeleteRoutingProfile"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] deleteRoutingProfile:[AWSConnectDeleteRoutingProfileRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDeleteRule { NSString *key = @"testDeleteRule"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] deleteRule:[AWSConnectDeleteRuleRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDeleteRuleCompletionHandler { NSString *key = @"testDeleteRule"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] deleteRule:[AWSConnectDeleteRuleRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDeleteSecurityProfile { NSString *key = @"testDeleteSecurityProfile"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] deleteSecurityProfile:[AWSConnectDeleteSecurityProfileRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDeleteSecurityProfileCompletionHandler { NSString *key = @"testDeleteSecurityProfile"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] deleteSecurityProfile:[AWSConnectDeleteSecurityProfileRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDeleteTaskTemplate { NSString *key = @"testDeleteTaskTemplate"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] deleteTaskTemplate:[AWSConnectDeleteTaskTemplateRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDeleteTaskTemplateCompletionHandler { NSString *key = @"testDeleteTaskTemplate"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] deleteTaskTemplate:[AWSConnectDeleteTaskTemplateRequest new] completionHandler:^(AWSConnectDeleteTaskTemplateResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDeleteTrafficDistributionGroup { NSString *key = @"testDeleteTrafficDistributionGroup"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] deleteTrafficDistributionGroup:[AWSConnectDeleteTrafficDistributionGroupRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDeleteTrafficDistributionGroupCompletionHandler { NSString *key = @"testDeleteTrafficDistributionGroup"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] deleteTrafficDistributionGroup:[AWSConnectDeleteTrafficDistributionGroupRequest new] completionHandler:^(AWSConnectDeleteTrafficDistributionGroupResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDeleteUseCase { NSString *key = @"testDeleteUseCase"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] deleteUseCase:[AWSConnectDeleteUseCaseRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDeleteUseCaseCompletionHandler { NSString *key = @"testDeleteUseCase"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] deleteUseCase:[AWSConnectDeleteUseCaseRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDeleteUser { NSString *key = @"testDeleteUser"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] deleteUser:[AWSConnectDeleteUserRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDeleteUserCompletionHandler { NSString *key = @"testDeleteUser"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] deleteUser:[AWSConnectDeleteUserRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDeleteUserHierarchyGroup { NSString *key = @"testDeleteUserHierarchyGroup"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] deleteUserHierarchyGroup:[AWSConnectDeleteUserHierarchyGroupRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDeleteUserHierarchyGroupCompletionHandler { NSString *key = @"testDeleteUserHierarchyGroup"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] deleteUserHierarchyGroup:[AWSConnectDeleteUserHierarchyGroupRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDeleteVocabulary { NSString *key = @"testDeleteVocabulary"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] deleteVocabulary:[AWSConnectDeleteVocabularyRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDeleteVocabularyCompletionHandler { NSString *key = @"testDeleteVocabulary"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] deleteVocabulary:[AWSConnectDeleteVocabularyRequest new] completionHandler:^(AWSConnectDeleteVocabularyResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribeAgentStatus { NSString *key = @"testDescribeAgentStatus"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] describeAgentStatus:[AWSConnectDescribeAgentStatusRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribeAgentStatusCompletionHandler { NSString *key = @"testDescribeAgentStatus"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] describeAgentStatus:[AWSConnectDescribeAgentStatusRequest new] completionHandler:^(AWSConnectDescribeAgentStatusResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribeContact { NSString *key = @"testDescribeContact"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] describeContact:[AWSConnectDescribeContactRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribeContactCompletionHandler { NSString *key = @"testDescribeContact"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] describeContact:[AWSConnectDescribeContactRequest new] completionHandler:^(AWSConnectDescribeContactResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribeContactEvaluation { NSString *key = @"testDescribeContactEvaluation"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] describeContactEvaluation:[AWSConnectDescribeContactEvaluationRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribeContactEvaluationCompletionHandler { NSString *key = @"testDescribeContactEvaluation"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] describeContactEvaluation:[AWSConnectDescribeContactEvaluationRequest new] completionHandler:^(AWSConnectDescribeContactEvaluationResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribeContactFlow { NSString *key = @"testDescribeContactFlow"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] describeContactFlow:[AWSConnectDescribeContactFlowRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribeContactFlowCompletionHandler { NSString *key = @"testDescribeContactFlow"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] describeContactFlow:[AWSConnectDescribeContactFlowRequest new] completionHandler:^(AWSConnectDescribeContactFlowResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribeContactFlowModule { NSString *key = @"testDescribeContactFlowModule"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] describeContactFlowModule:[AWSConnectDescribeContactFlowModuleRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribeContactFlowModuleCompletionHandler { NSString *key = @"testDescribeContactFlowModule"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] describeContactFlowModule:[AWSConnectDescribeContactFlowModuleRequest new] completionHandler:^(AWSConnectDescribeContactFlowModuleResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribeEvaluationForm { NSString *key = @"testDescribeEvaluationForm"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] describeEvaluationForm:[AWSConnectDescribeEvaluationFormRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribeEvaluationFormCompletionHandler { NSString *key = @"testDescribeEvaluationForm"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] describeEvaluationForm:[AWSConnectDescribeEvaluationFormRequest new] completionHandler:^(AWSConnectDescribeEvaluationFormResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribeHoursOfOperation { NSString *key = @"testDescribeHoursOfOperation"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] describeHoursOfOperation:[AWSConnectDescribeHoursOfOperationRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribeHoursOfOperationCompletionHandler { NSString *key = @"testDescribeHoursOfOperation"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] describeHoursOfOperation:[AWSConnectDescribeHoursOfOperationRequest new] completionHandler:^(AWSConnectDescribeHoursOfOperationResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribeInstance { NSString *key = @"testDescribeInstance"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] describeInstance:[AWSConnectDescribeInstanceRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribeInstanceCompletionHandler { NSString *key = @"testDescribeInstance"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] describeInstance:[AWSConnectDescribeInstanceRequest new] completionHandler:^(AWSConnectDescribeInstanceResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribeInstanceAttribute { NSString *key = @"testDescribeInstanceAttribute"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] describeInstanceAttribute:[AWSConnectDescribeInstanceAttributeRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribeInstanceAttributeCompletionHandler { NSString *key = @"testDescribeInstanceAttribute"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] describeInstanceAttribute:[AWSConnectDescribeInstanceAttributeRequest new] completionHandler:^(AWSConnectDescribeInstanceAttributeResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribeInstanceStorageConfig { NSString *key = @"testDescribeInstanceStorageConfig"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] describeInstanceStorageConfig:[AWSConnectDescribeInstanceStorageConfigRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribeInstanceStorageConfigCompletionHandler { NSString *key = @"testDescribeInstanceStorageConfig"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] describeInstanceStorageConfig:[AWSConnectDescribeInstanceStorageConfigRequest new] completionHandler:^(AWSConnectDescribeInstanceStorageConfigResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribePhoneNumber { NSString *key = @"testDescribePhoneNumber"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] describePhoneNumber:[AWSConnectDescribePhoneNumberRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribePhoneNumberCompletionHandler { NSString *key = @"testDescribePhoneNumber"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] describePhoneNumber:[AWSConnectDescribePhoneNumberRequest new] completionHandler:^(AWSConnectDescribePhoneNumberResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribePrompt { NSString *key = @"testDescribePrompt"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] describePrompt:[AWSConnectDescribePromptRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribePromptCompletionHandler { NSString *key = @"testDescribePrompt"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] describePrompt:[AWSConnectDescribePromptRequest new] completionHandler:^(AWSConnectDescribePromptResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribeQueue { NSString *key = @"testDescribeQueue"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] describeQueue:[AWSConnectDescribeQueueRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribeQueueCompletionHandler { NSString *key = @"testDescribeQueue"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] describeQueue:[AWSConnectDescribeQueueRequest new] completionHandler:^(AWSConnectDescribeQueueResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribeQuickConnect { NSString *key = @"testDescribeQuickConnect"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] describeQuickConnect:[AWSConnectDescribeQuickConnectRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribeQuickConnectCompletionHandler { NSString *key = @"testDescribeQuickConnect"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] describeQuickConnect:[AWSConnectDescribeQuickConnectRequest new] completionHandler:^(AWSConnectDescribeQuickConnectResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribeRoutingProfile { NSString *key = @"testDescribeRoutingProfile"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] describeRoutingProfile:[AWSConnectDescribeRoutingProfileRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribeRoutingProfileCompletionHandler { NSString *key = @"testDescribeRoutingProfile"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] describeRoutingProfile:[AWSConnectDescribeRoutingProfileRequest new] completionHandler:^(AWSConnectDescribeRoutingProfileResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribeRule { NSString *key = @"testDescribeRule"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] describeRule:[AWSConnectDescribeRuleRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribeRuleCompletionHandler { NSString *key = @"testDescribeRule"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] describeRule:[AWSConnectDescribeRuleRequest new] completionHandler:^(AWSConnectDescribeRuleResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribeSecurityProfile { NSString *key = @"testDescribeSecurityProfile"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] describeSecurityProfile:[AWSConnectDescribeSecurityProfileRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribeSecurityProfileCompletionHandler { NSString *key = @"testDescribeSecurityProfile"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] describeSecurityProfile:[AWSConnectDescribeSecurityProfileRequest new] completionHandler:^(AWSConnectDescribeSecurityProfileResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribeTrafficDistributionGroup { NSString *key = @"testDescribeTrafficDistributionGroup"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] describeTrafficDistributionGroup:[AWSConnectDescribeTrafficDistributionGroupRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribeTrafficDistributionGroupCompletionHandler { NSString *key = @"testDescribeTrafficDistributionGroup"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] describeTrafficDistributionGroup:[AWSConnectDescribeTrafficDistributionGroupRequest new] completionHandler:^(AWSConnectDescribeTrafficDistributionGroupResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribeUser { NSString *key = @"testDescribeUser"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] describeUser:[AWSConnectDescribeUserRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribeUserCompletionHandler { NSString *key = @"testDescribeUser"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] describeUser:[AWSConnectDescribeUserRequest new] completionHandler:^(AWSConnectDescribeUserResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribeUserHierarchyGroup { NSString *key = @"testDescribeUserHierarchyGroup"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] describeUserHierarchyGroup:[AWSConnectDescribeUserHierarchyGroupRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribeUserHierarchyGroupCompletionHandler { NSString *key = @"testDescribeUserHierarchyGroup"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] describeUserHierarchyGroup:[AWSConnectDescribeUserHierarchyGroupRequest new] completionHandler:^(AWSConnectDescribeUserHierarchyGroupResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribeUserHierarchyStructure { NSString *key = @"testDescribeUserHierarchyStructure"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] describeUserHierarchyStructure:[AWSConnectDescribeUserHierarchyStructureRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribeUserHierarchyStructureCompletionHandler { NSString *key = @"testDescribeUserHierarchyStructure"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] describeUserHierarchyStructure:[AWSConnectDescribeUserHierarchyStructureRequest new] completionHandler:^(AWSConnectDescribeUserHierarchyStructureResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribeVocabulary { NSString *key = @"testDescribeVocabulary"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] describeVocabulary:[AWSConnectDescribeVocabularyRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDescribeVocabularyCompletionHandler { NSString *key = @"testDescribeVocabulary"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] describeVocabulary:[AWSConnectDescribeVocabularyRequest new] completionHandler:^(AWSConnectDescribeVocabularyResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDisassociateApprovedOrigin { NSString *key = @"testDisassociateApprovedOrigin"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] disassociateApprovedOrigin:[AWSConnectDisassociateApprovedOriginRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDisassociateApprovedOriginCompletionHandler { NSString *key = @"testDisassociateApprovedOrigin"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] disassociateApprovedOrigin:[AWSConnectDisassociateApprovedOriginRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDisassociateBot { NSString *key = @"testDisassociateBot"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] disassociateBot:[AWSConnectDisassociateBotRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDisassociateBotCompletionHandler { NSString *key = @"testDisassociateBot"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] disassociateBot:[AWSConnectDisassociateBotRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDisassociateInstanceStorageConfig { NSString *key = @"testDisassociateInstanceStorageConfig"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] disassociateInstanceStorageConfig:[AWSConnectDisassociateInstanceStorageConfigRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDisassociateInstanceStorageConfigCompletionHandler { NSString *key = @"testDisassociateInstanceStorageConfig"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] disassociateInstanceStorageConfig:[AWSConnectDisassociateInstanceStorageConfigRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDisassociateLambdaFunction { NSString *key = @"testDisassociateLambdaFunction"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] disassociateLambdaFunction:[AWSConnectDisassociateLambdaFunctionRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDisassociateLambdaFunctionCompletionHandler { NSString *key = @"testDisassociateLambdaFunction"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] disassociateLambdaFunction:[AWSConnectDisassociateLambdaFunctionRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDisassociateLexBot { NSString *key = @"testDisassociateLexBot"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] disassociateLexBot:[AWSConnectDisassociateLexBotRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDisassociateLexBotCompletionHandler { NSString *key = @"testDisassociateLexBot"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] disassociateLexBot:[AWSConnectDisassociateLexBotRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDisassociatePhoneNumberContactFlow { NSString *key = @"testDisassociatePhoneNumberContactFlow"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] disassociatePhoneNumberContactFlow:[AWSConnectDisassociatePhoneNumberContactFlowRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDisassociatePhoneNumberContactFlowCompletionHandler { NSString *key = @"testDisassociatePhoneNumberContactFlow"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] disassociatePhoneNumberContactFlow:[AWSConnectDisassociatePhoneNumberContactFlowRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDisassociateQueueQuickConnects { NSString *key = @"testDisassociateQueueQuickConnects"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] disassociateQueueQuickConnects:[AWSConnectDisassociateQueueQuickConnectsRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDisassociateQueueQuickConnectsCompletionHandler { NSString *key = @"testDisassociateQueueQuickConnects"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] disassociateQueueQuickConnects:[AWSConnectDisassociateQueueQuickConnectsRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDisassociateRoutingProfileQueues { NSString *key = @"testDisassociateRoutingProfileQueues"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] disassociateRoutingProfileQueues:[AWSConnectDisassociateRoutingProfileQueuesRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDisassociateRoutingProfileQueuesCompletionHandler { NSString *key = @"testDisassociateRoutingProfileQueues"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] disassociateRoutingProfileQueues:[AWSConnectDisassociateRoutingProfileQueuesRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDisassociateSecurityKey { NSString *key = @"testDisassociateSecurityKey"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] disassociateSecurityKey:[AWSConnectDisassociateSecurityKeyRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDisassociateSecurityKeyCompletionHandler { NSString *key = @"testDisassociateSecurityKey"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] disassociateSecurityKey:[AWSConnectDisassociateSecurityKeyRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDismissUserContact { NSString *key = @"testDismissUserContact"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] dismissUserContact:[AWSConnectDismissUserContactRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testDismissUserContactCompletionHandler { NSString *key = @"testDismissUserContact"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] dismissUserContact:[AWSConnectDismissUserContactRequest new] completionHandler:^(AWSConnectDismissUserContactResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testGetContactAttributes { NSString *key = @"testGetContactAttributes"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] getContactAttributes:[AWSConnectGetContactAttributesRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testGetContactAttributesCompletionHandler { NSString *key = @"testGetContactAttributes"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] getContactAttributes:[AWSConnectGetContactAttributesRequest new] completionHandler:^(AWSConnectGetContactAttributesResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testGetCurrentMetricData { NSString *key = @"testGetCurrentMetricData"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] getCurrentMetricData:[AWSConnectGetCurrentMetricDataRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testGetCurrentMetricDataCompletionHandler { NSString *key = @"testGetCurrentMetricData"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] getCurrentMetricData:[AWSConnectGetCurrentMetricDataRequest new] completionHandler:^(AWSConnectGetCurrentMetricDataResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testGetCurrentUserData { NSString *key = @"testGetCurrentUserData"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] getCurrentUserData:[AWSConnectGetCurrentUserDataRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testGetCurrentUserDataCompletionHandler { NSString *key = @"testGetCurrentUserData"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] getCurrentUserData:[AWSConnectGetCurrentUserDataRequest new] completionHandler:^(AWSConnectGetCurrentUserDataResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testGetFederationToken { NSString *key = @"testGetFederationToken"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] getFederationToken:[AWSConnectGetFederationTokenRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testGetFederationTokenCompletionHandler { NSString *key = @"testGetFederationToken"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] getFederationToken:[AWSConnectGetFederationTokenRequest new] completionHandler:^(AWSConnectGetFederationTokenResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testGetMetricData { NSString *key = @"testGetMetricData"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] getMetricData:[AWSConnectGetMetricDataRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testGetMetricDataCompletionHandler { NSString *key = @"testGetMetricData"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] getMetricData:[AWSConnectGetMetricDataRequest new] completionHandler:^(AWSConnectGetMetricDataResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testGetMetricDataV2 { NSString *key = @"testGetMetricDataV2"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] getMetricDataV2:[AWSConnectGetMetricDataV2Request new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testGetMetricDataV2CompletionHandler { NSString *key = @"testGetMetricDataV2"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] getMetricDataV2:[AWSConnectGetMetricDataV2Request new] completionHandler:^(AWSConnectGetMetricDataV2Response* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testGetPromptFile { NSString *key = @"testGetPromptFile"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] getPromptFile:[AWSConnectGetPromptFileRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testGetPromptFileCompletionHandler { NSString *key = @"testGetPromptFile"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] getPromptFile:[AWSConnectGetPromptFileRequest new] completionHandler:^(AWSConnectGetPromptFileResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testGetTaskTemplate { NSString *key = @"testGetTaskTemplate"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] getTaskTemplate:[AWSConnectGetTaskTemplateRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testGetTaskTemplateCompletionHandler { NSString *key = @"testGetTaskTemplate"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] getTaskTemplate:[AWSConnectGetTaskTemplateRequest new] completionHandler:^(AWSConnectGetTaskTemplateResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testGetTrafficDistribution { NSString *key = @"testGetTrafficDistribution"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] getTrafficDistribution:[AWSConnectGetTrafficDistributionRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testGetTrafficDistributionCompletionHandler { NSString *key = @"testGetTrafficDistribution"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] getTrafficDistribution:[AWSConnectGetTrafficDistributionRequest new] completionHandler:^(AWSConnectGetTrafficDistributionResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListAgentStatuses { NSString *key = @"testListAgentStatuses"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] listAgentStatuses:[AWSConnectListAgentStatusRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListAgentStatusesCompletionHandler { NSString *key = @"testListAgentStatuses"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] listAgentStatuses:[AWSConnectListAgentStatusRequest new] completionHandler:^(AWSConnectListAgentStatusResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListApprovedOrigins { NSString *key = @"testListApprovedOrigins"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] listApprovedOrigins:[AWSConnectListApprovedOriginsRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListApprovedOriginsCompletionHandler { NSString *key = @"testListApprovedOrigins"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] listApprovedOrigins:[AWSConnectListApprovedOriginsRequest new] completionHandler:^(AWSConnectListApprovedOriginsResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListBots { NSString *key = @"testListBots"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] listBots:[AWSConnectListBotsRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListBotsCompletionHandler { NSString *key = @"testListBots"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] listBots:[AWSConnectListBotsRequest new] completionHandler:^(AWSConnectListBotsResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListContactEvaluations { NSString *key = @"testListContactEvaluations"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] listContactEvaluations:[AWSConnectListContactEvaluationsRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListContactEvaluationsCompletionHandler { NSString *key = @"testListContactEvaluations"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] listContactEvaluations:[AWSConnectListContactEvaluationsRequest new] completionHandler:^(AWSConnectListContactEvaluationsResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListContactFlowModules { NSString *key = @"testListContactFlowModules"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] listContactFlowModules:[AWSConnectListContactFlowModulesRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListContactFlowModulesCompletionHandler { NSString *key = @"testListContactFlowModules"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] listContactFlowModules:[AWSConnectListContactFlowModulesRequest new] completionHandler:^(AWSConnectListContactFlowModulesResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListContactFlows { NSString *key = @"testListContactFlows"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] listContactFlows:[AWSConnectListContactFlowsRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListContactFlowsCompletionHandler { NSString *key = @"testListContactFlows"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] listContactFlows:[AWSConnectListContactFlowsRequest new] completionHandler:^(AWSConnectListContactFlowsResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListContactReferences { NSString *key = @"testListContactReferences"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] listContactReferences:[AWSConnectListContactReferencesRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListContactReferencesCompletionHandler { NSString *key = @"testListContactReferences"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] listContactReferences:[AWSConnectListContactReferencesRequest new] completionHandler:^(AWSConnectListContactReferencesResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListDefaultVocabularies { NSString *key = @"testListDefaultVocabularies"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] listDefaultVocabularies:[AWSConnectListDefaultVocabulariesRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListDefaultVocabulariesCompletionHandler { NSString *key = @"testListDefaultVocabularies"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] listDefaultVocabularies:[AWSConnectListDefaultVocabulariesRequest new] completionHandler:^(AWSConnectListDefaultVocabulariesResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListEvaluationFormVersions { NSString *key = @"testListEvaluationFormVersions"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] listEvaluationFormVersions:[AWSConnectListEvaluationFormVersionsRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListEvaluationFormVersionsCompletionHandler { NSString *key = @"testListEvaluationFormVersions"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] listEvaluationFormVersions:[AWSConnectListEvaluationFormVersionsRequest new] completionHandler:^(AWSConnectListEvaluationFormVersionsResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListEvaluationForms { NSString *key = @"testListEvaluationForms"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] listEvaluationForms:[AWSConnectListEvaluationFormsRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListEvaluationFormsCompletionHandler { NSString *key = @"testListEvaluationForms"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] listEvaluationForms:[AWSConnectListEvaluationFormsRequest new] completionHandler:^(AWSConnectListEvaluationFormsResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListHoursOfOperations { NSString *key = @"testListHoursOfOperations"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] listHoursOfOperations:[AWSConnectListHoursOfOperationsRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListHoursOfOperationsCompletionHandler { NSString *key = @"testListHoursOfOperations"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] listHoursOfOperations:[AWSConnectListHoursOfOperationsRequest new] completionHandler:^(AWSConnectListHoursOfOperationsResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListInstanceAttributes { NSString *key = @"testListInstanceAttributes"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] listInstanceAttributes:[AWSConnectListInstanceAttributesRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListInstanceAttributesCompletionHandler { NSString *key = @"testListInstanceAttributes"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] listInstanceAttributes:[AWSConnectListInstanceAttributesRequest new] completionHandler:^(AWSConnectListInstanceAttributesResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListInstanceStorageConfigs { NSString *key = @"testListInstanceStorageConfigs"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] listInstanceStorageConfigs:[AWSConnectListInstanceStorageConfigsRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListInstanceStorageConfigsCompletionHandler { NSString *key = @"testListInstanceStorageConfigs"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] listInstanceStorageConfigs:[AWSConnectListInstanceStorageConfigsRequest new] completionHandler:^(AWSConnectListInstanceStorageConfigsResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListInstances { NSString *key = @"testListInstances"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] listInstances:[AWSConnectListInstancesRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListInstancesCompletionHandler { NSString *key = @"testListInstances"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] listInstances:[AWSConnectListInstancesRequest new] completionHandler:^(AWSConnectListInstancesResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListIntegrationAssociations { NSString *key = @"testListIntegrationAssociations"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] listIntegrationAssociations:[AWSConnectListIntegrationAssociationsRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListIntegrationAssociationsCompletionHandler { NSString *key = @"testListIntegrationAssociations"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] listIntegrationAssociations:[AWSConnectListIntegrationAssociationsRequest new] completionHandler:^(AWSConnectListIntegrationAssociationsResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListLambdaFunctions { NSString *key = @"testListLambdaFunctions"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] listLambdaFunctions:[AWSConnectListLambdaFunctionsRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListLambdaFunctionsCompletionHandler { NSString *key = @"testListLambdaFunctions"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] listLambdaFunctions:[AWSConnectListLambdaFunctionsRequest new] completionHandler:^(AWSConnectListLambdaFunctionsResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListLexBots { NSString *key = @"testListLexBots"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] listLexBots:[AWSConnectListLexBotsRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListLexBotsCompletionHandler { NSString *key = @"testListLexBots"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] listLexBots:[AWSConnectListLexBotsRequest new] completionHandler:^(AWSConnectListLexBotsResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListPhoneNumbers { NSString *key = @"testListPhoneNumbers"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] listPhoneNumbers:[AWSConnectListPhoneNumbersRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListPhoneNumbersCompletionHandler { NSString *key = @"testListPhoneNumbers"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] listPhoneNumbers:[AWSConnectListPhoneNumbersRequest new] completionHandler:^(AWSConnectListPhoneNumbersResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListPhoneNumbersV2 { NSString *key = @"testListPhoneNumbersV2"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] listPhoneNumbersV2:[AWSConnectListPhoneNumbersV2Request new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListPhoneNumbersV2CompletionHandler { NSString *key = @"testListPhoneNumbersV2"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] listPhoneNumbersV2:[AWSConnectListPhoneNumbersV2Request new] completionHandler:^(AWSConnectListPhoneNumbersV2Response* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListPrompts { NSString *key = @"testListPrompts"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] listPrompts:[AWSConnectListPromptsRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListPromptsCompletionHandler { NSString *key = @"testListPrompts"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] listPrompts:[AWSConnectListPromptsRequest new] completionHandler:^(AWSConnectListPromptsResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListQueueQuickConnects { NSString *key = @"testListQueueQuickConnects"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] listQueueQuickConnects:[AWSConnectListQueueQuickConnectsRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListQueueQuickConnectsCompletionHandler { NSString *key = @"testListQueueQuickConnects"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] listQueueQuickConnects:[AWSConnectListQueueQuickConnectsRequest new] completionHandler:^(AWSConnectListQueueQuickConnectsResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListQueues { NSString *key = @"testListQueues"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] listQueues:[AWSConnectListQueuesRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListQueuesCompletionHandler { NSString *key = @"testListQueues"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] listQueues:[AWSConnectListQueuesRequest new] completionHandler:^(AWSConnectListQueuesResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListQuickConnects { NSString *key = @"testListQuickConnects"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] listQuickConnects:[AWSConnectListQuickConnectsRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListQuickConnectsCompletionHandler { NSString *key = @"testListQuickConnects"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] listQuickConnects:[AWSConnectListQuickConnectsRequest new] completionHandler:^(AWSConnectListQuickConnectsResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListRoutingProfileQueues { NSString *key = @"testListRoutingProfileQueues"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] listRoutingProfileQueues:[AWSConnectListRoutingProfileQueuesRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListRoutingProfileQueuesCompletionHandler { NSString *key = @"testListRoutingProfileQueues"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] listRoutingProfileQueues:[AWSConnectListRoutingProfileQueuesRequest new] completionHandler:^(AWSConnectListRoutingProfileQueuesResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListRoutingProfiles { NSString *key = @"testListRoutingProfiles"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] listRoutingProfiles:[AWSConnectListRoutingProfilesRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListRoutingProfilesCompletionHandler { NSString *key = @"testListRoutingProfiles"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] listRoutingProfiles:[AWSConnectListRoutingProfilesRequest new] completionHandler:^(AWSConnectListRoutingProfilesResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListRules { NSString *key = @"testListRules"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] listRules:[AWSConnectListRulesRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListRulesCompletionHandler { NSString *key = @"testListRules"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] listRules:[AWSConnectListRulesRequest new] completionHandler:^(AWSConnectListRulesResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListSecurityKeys { NSString *key = @"testListSecurityKeys"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] listSecurityKeys:[AWSConnectListSecurityKeysRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListSecurityKeysCompletionHandler { NSString *key = @"testListSecurityKeys"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] listSecurityKeys:[AWSConnectListSecurityKeysRequest new] completionHandler:^(AWSConnectListSecurityKeysResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListSecurityProfilePermissions { NSString *key = @"testListSecurityProfilePermissions"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] listSecurityProfilePermissions:[AWSConnectListSecurityProfilePermissionsRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListSecurityProfilePermissionsCompletionHandler { NSString *key = @"testListSecurityProfilePermissions"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] listSecurityProfilePermissions:[AWSConnectListSecurityProfilePermissionsRequest new] completionHandler:^(AWSConnectListSecurityProfilePermissionsResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListSecurityProfiles { NSString *key = @"testListSecurityProfiles"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] listSecurityProfiles:[AWSConnectListSecurityProfilesRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListSecurityProfilesCompletionHandler { NSString *key = @"testListSecurityProfiles"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] listSecurityProfiles:[AWSConnectListSecurityProfilesRequest new] completionHandler:^(AWSConnectListSecurityProfilesResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListTagsForResource { NSString *key = @"testListTagsForResource"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] listTagsForResource:[AWSConnectListTagsForResourceRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListTagsForResourceCompletionHandler { NSString *key = @"testListTagsForResource"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] listTagsForResource:[AWSConnectListTagsForResourceRequest new] completionHandler:^(AWSConnectListTagsForResourceResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListTaskTemplates { NSString *key = @"testListTaskTemplates"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] listTaskTemplates:[AWSConnectListTaskTemplatesRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListTaskTemplatesCompletionHandler { NSString *key = @"testListTaskTemplates"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] listTaskTemplates:[AWSConnectListTaskTemplatesRequest new] completionHandler:^(AWSConnectListTaskTemplatesResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListTrafficDistributionGroups { NSString *key = @"testListTrafficDistributionGroups"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] listTrafficDistributionGroups:[AWSConnectListTrafficDistributionGroupsRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListTrafficDistributionGroupsCompletionHandler { NSString *key = @"testListTrafficDistributionGroups"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] listTrafficDistributionGroups:[AWSConnectListTrafficDistributionGroupsRequest new] completionHandler:^(AWSConnectListTrafficDistributionGroupsResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListUseCases { NSString *key = @"testListUseCases"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] listUseCases:[AWSConnectListUseCasesRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListUseCasesCompletionHandler { NSString *key = @"testListUseCases"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] listUseCases:[AWSConnectListUseCasesRequest new] completionHandler:^(AWSConnectListUseCasesResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListUserHierarchyGroups { NSString *key = @"testListUserHierarchyGroups"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] listUserHierarchyGroups:[AWSConnectListUserHierarchyGroupsRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListUserHierarchyGroupsCompletionHandler { NSString *key = @"testListUserHierarchyGroups"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] listUserHierarchyGroups:[AWSConnectListUserHierarchyGroupsRequest new] completionHandler:^(AWSConnectListUserHierarchyGroupsResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListUsers { NSString *key = @"testListUsers"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] listUsers:[AWSConnectListUsersRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testListUsersCompletionHandler { NSString *key = @"testListUsers"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] listUsers:[AWSConnectListUsersRequest new] completionHandler:^(AWSConnectListUsersResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testMonitorContact { NSString *key = @"testMonitorContact"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] monitorContact:[AWSConnectMonitorContactRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testMonitorContactCompletionHandler { NSString *key = @"testMonitorContact"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] monitorContact:[AWSConnectMonitorContactRequest new] completionHandler:^(AWSConnectMonitorContactResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testPutUserStatus { NSString *key = @"testPutUserStatus"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] putUserStatus:[AWSConnectPutUserStatusRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testPutUserStatusCompletionHandler { NSString *key = @"testPutUserStatus"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] putUserStatus:[AWSConnectPutUserStatusRequest new] completionHandler:^(AWSConnectPutUserStatusResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testReleasePhoneNumber { NSString *key = @"testReleasePhoneNumber"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] releasePhoneNumber:[AWSConnectReleasePhoneNumberRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testReleasePhoneNumberCompletionHandler { NSString *key = @"testReleasePhoneNumber"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] releasePhoneNumber:[AWSConnectReleasePhoneNumberRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testReplicateInstance { NSString *key = @"testReplicateInstance"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] replicateInstance:[AWSConnectReplicateInstanceRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testReplicateInstanceCompletionHandler { NSString *key = @"testReplicateInstance"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] replicateInstance:[AWSConnectReplicateInstanceRequest new] completionHandler:^(AWSConnectReplicateInstanceResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testResumeContactRecording { NSString *key = @"testResumeContactRecording"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] resumeContactRecording:[AWSConnectResumeContactRecordingRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testResumeContactRecordingCompletionHandler { NSString *key = @"testResumeContactRecording"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] resumeContactRecording:[AWSConnectResumeContactRecordingRequest new] completionHandler:^(AWSConnectResumeContactRecordingResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testSearchAvailablePhoneNumbers { NSString *key = @"testSearchAvailablePhoneNumbers"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] searchAvailablePhoneNumbers:[AWSConnectSearchAvailablePhoneNumbersRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testSearchAvailablePhoneNumbersCompletionHandler { NSString *key = @"testSearchAvailablePhoneNumbers"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] searchAvailablePhoneNumbers:[AWSConnectSearchAvailablePhoneNumbersRequest new] completionHandler:^(AWSConnectSearchAvailablePhoneNumbersResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testSearchHoursOfOperations { NSString *key = @"testSearchHoursOfOperations"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] searchHoursOfOperations:[AWSConnectSearchHoursOfOperationsRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testSearchHoursOfOperationsCompletionHandler { NSString *key = @"testSearchHoursOfOperations"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] searchHoursOfOperations:[AWSConnectSearchHoursOfOperationsRequest new] completionHandler:^(AWSConnectSearchHoursOfOperationsResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testSearchPrompts { NSString *key = @"testSearchPrompts"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] searchPrompts:[AWSConnectSearchPromptsRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testSearchPromptsCompletionHandler { NSString *key = @"testSearchPrompts"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] searchPrompts:[AWSConnectSearchPromptsRequest new] completionHandler:^(AWSConnectSearchPromptsResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testSearchQueues { NSString *key = @"testSearchQueues"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] searchQueues:[AWSConnectSearchQueuesRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testSearchQueuesCompletionHandler { NSString *key = @"testSearchQueues"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] searchQueues:[AWSConnectSearchQueuesRequest new] completionHandler:^(AWSConnectSearchQueuesResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testSearchQuickConnects { NSString *key = @"testSearchQuickConnects"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] searchQuickConnects:[AWSConnectSearchQuickConnectsRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testSearchQuickConnectsCompletionHandler { NSString *key = @"testSearchQuickConnects"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] searchQuickConnects:[AWSConnectSearchQuickConnectsRequest new] completionHandler:^(AWSConnectSearchQuickConnectsResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testSearchResourceTags { NSString *key = @"testSearchResourceTags"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] searchResourceTags:[AWSConnectSearchResourceTagsRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testSearchResourceTagsCompletionHandler { NSString *key = @"testSearchResourceTags"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] searchResourceTags:[AWSConnectSearchResourceTagsRequest new] completionHandler:^(AWSConnectSearchResourceTagsResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testSearchRoutingProfiles { NSString *key = @"testSearchRoutingProfiles"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] searchRoutingProfiles:[AWSConnectSearchRoutingProfilesRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testSearchRoutingProfilesCompletionHandler { NSString *key = @"testSearchRoutingProfiles"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] searchRoutingProfiles:[AWSConnectSearchRoutingProfilesRequest new] completionHandler:^(AWSConnectSearchRoutingProfilesResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testSearchSecurityProfiles { NSString *key = @"testSearchSecurityProfiles"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] searchSecurityProfiles:[AWSConnectSearchSecurityProfilesRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testSearchSecurityProfilesCompletionHandler { NSString *key = @"testSearchSecurityProfiles"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] searchSecurityProfiles:[AWSConnectSearchSecurityProfilesRequest new] completionHandler:^(AWSConnectSearchSecurityProfilesResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testSearchUsers { NSString *key = @"testSearchUsers"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] searchUsers:[AWSConnectSearchUsersRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testSearchUsersCompletionHandler { NSString *key = @"testSearchUsers"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] searchUsers:[AWSConnectSearchUsersRequest new] completionHandler:^(AWSConnectSearchUsersResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testSearchVocabularies { NSString *key = @"testSearchVocabularies"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] searchVocabularies:[AWSConnectSearchVocabulariesRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testSearchVocabulariesCompletionHandler { NSString *key = @"testSearchVocabularies"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] searchVocabularies:[AWSConnectSearchVocabulariesRequest new] completionHandler:^(AWSConnectSearchVocabulariesResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testStartChatContact { NSString *key = @"testStartChatContact"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] startChatContact:[AWSConnectStartChatContactRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testStartChatContactCompletionHandler { NSString *key = @"testStartChatContact"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] startChatContact:[AWSConnectStartChatContactRequest new] completionHandler:^(AWSConnectStartChatContactResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testStartContactEvaluation { NSString *key = @"testStartContactEvaluation"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] startContactEvaluation:[AWSConnectStartContactEvaluationRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testStartContactEvaluationCompletionHandler { NSString *key = @"testStartContactEvaluation"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] startContactEvaluation:[AWSConnectStartContactEvaluationRequest new] completionHandler:^(AWSConnectStartContactEvaluationResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testStartContactRecording { NSString *key = @"testStartContactRecording"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] startContactRecording:[AWSConnectStartContactRecordingRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testStartContactRecordingCompletionHandler { NSString *key = @"testStartContactRecording"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] startContactRecording:[AWSConnectStartContactRecordingRequest new] completionHandler:^(AWSConnectStartContactRecordingResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testStartContactStreaming { NSString *key = @"testStartContactStreaming"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] startContactStreaming:[AWSConnectStartContactStreamingRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testStartContactStreamingCompletionHandler { NSString *key = @"testStartContactStreaming"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] startContactStreaming:[AWSConnectStartContactStreamingRequest new] completionHandler:^(AWSConnectStartContactStreamingResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testStartOutboundVoiceContact { NSString *key = @"testStartOutboundVoiceContact"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] startOutboundVoiceContact:[AWSConnectStartOutboundVoiceContactRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testStartOutboundVoiceContactCompletionHandler { NSString *key = @"testStartOutboundVoiceContact"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] startOutboundVoiceContact:[AWSConnectStartOutboundVoiceContactRequest new] completionHandler:^(AWSConnectStartOutboundVoiceContactResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testStartTaskContact { NSString *key = @"testStartTaskContact"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] startTaskContact:[AWSConnectStartTaskContactRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testStartTaskContactCompletionHandler { NSString *key = @"testStartTaskContact"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] startTaskContact:[AWSConnectStartTaskContactRequest new] completionHandler:^(AWSConnectStartTaskContactResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testStopContact { NSString *key = @"testStopContact"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] stopContact:[AWSConnectStopContactRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testStopContactCompletionHandler { NSString *key = @"testStopContact"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] stopContact:[AWSConnectStopContactRequest new] completionHandler:^(AWSConnectStopContactResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testStopContactRecording { NSString *key = @"testStopContactRecording"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] stopContactRecording:[AWSConnectStopContactRecordingRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testStopContactRecordingCompletionHandler { NSString *key = @"testStopContactRecording"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] stopContactRecording:[AWSConnectStopContactRecordingRequest new] completionHandler:^(AWSConnectStopContactRecordingResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testStopContactStreaming { NSString *key = @"testStopContactStreaming"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] stopContactStreaming:[AWSConnectStopContactStreamingRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testStopContactStreamingCompletionHandler { NSString *key = @"testStopContactStreaming"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] stopContactStreaming:[AWSConnectStopContactStreamingRequest new] completionHandler:^(AWSConnectStopContactStreamingResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testSubmitContactEvaluation { NSString *key = @"testSubmitContactEvaluation"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] submitContactEvaluation:[AWSConnectSubmitContactEvaluationRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testSubmitContactEvaluationCompletionHandler { NSString *key = @"testSubmitContactEvaluation"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] submitContactEvaluation:[AWSConnectSubmitContactEvaluationRequest new] completionHandler:^(AWSConnectSubmitContactEvaluationResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testSuspendContactRecording { NSString *key = @"testSuspendContactRecording"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] suspendContactRecording:[AWSConnectSuspendContactRecordingRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testSuspendContactRecordingCompletionHandler { NSString *key = @"testSuspendContactRecording"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] suspendContactRecording:[AWSConnectSuspendContactRecordingRequest new] completionHandler:^(AWSConnectSuspendContactRecordingResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testTagResource { NSString *key = @"testTagResource"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] tagResource:[AWSConnectTagResourceRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testTagResourceCompletionHandler { NSString *key = @"testTagResource"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] tagResource:[AWSConnectTagResourceRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testTransferContact { NSString *key = @"testTransferContact"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] transferContact:[AWSConnectTransferContactRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testTransferContactCompletionHandler { NSString *key = @"testTransferContact"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] transferContact:[AWSConnectTransferContactRequest new] completionHandler:^(AWSConnectTransferContactResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUntagResource { NSString *key = @"testUntagResource"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] untagResource:[AWSConnectUntagResourceRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUntagResourceCompletionHandler { NSString *key = @"testUntagResource"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] untagResource:[AWSConnectUntagResourceRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateAgentStatus { NSString *key = @"testUpdateAgentStatus"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] updateAgentStatus:[AWSConnectUpdateAgentStatusRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateAgentStatusCompletionHandler { NSString *key = @"testUpdateAgentStatus"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] updateAgentStatus:[AWSConnectUpdateAgentStatusRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateContact { NSString *key = @"testUpdateContact"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] updateContact:[AWSConnectUpdateContactRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateContactCompletionHandler { NSString *key = @"testUpdateContact"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] updateContact:[AWSConnectUpdateContactRequest new] completionHandler:^(AWSConnectUpdateContactResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateContactAttributes { NSString *key = @"testUpdateContactAttributes"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] updateContactAttributes:[AWSConnectUpdateContactAttributesRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateContactAttributesCompletionHandler { NSString *key = @"testUpdateContactAttributes"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] updateContactAttributes:[AWSConnectUpdateContactAttributesRequest new] completionHandler:^(AWSConnectUpdateContactAttributesResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateContactEvaluation { NSString *key = @"testUpdateContactEvaluation"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] updateContactEvaluation:[AWSConnectUpdateContactEvaluationRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateContactEvaluationCompletionHandler { NSString *key = @"testUpdateContactEvaluation"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] updateContactEvaluation:[AWSConnectUpdateContactEvaluationRequest new] completionHandler:^(AWSConnectUpdateContactEvaluationResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateContactFlowContent { NSString *key = @"testUpdateContactFlowContent"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] updateContactFlowContent:[AWSConnectUpdateContactFlowContentRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateContactFlowContentCompletionHandler { NSString *key = @"testUpdateContactFlowContent"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] updateContactFlowContent:[AWSConnectUpdateContactFlowContentRequest new] completionHandler:^(AWSConnectUpdateContactFlowContentResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateContactFlowMetadata { NSString *key = @"testUpdateContactFlowMetadata"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] updateContactFlowMetadata:[AWSConnectUpdateContactFlowMetadataRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateContactFlowMetadataCompletionHandler { NSString *key = @"testUpdateContactFlowMetadata"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] updateContactFlowMetadata:[AWSConnectUpdateContactFlowMetadataRequest new] completionHandler:^(AWSConnectUpdateContactFlowMetadataResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateContactFlowModuleContent { NSString *key = @"testUpdateContactFlowModuleContent"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] updateContactFlowModuleContent:[AWSConnectUpdateContactFlowModuleContentRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateContactFlowModuleContentCompletionHandler { NSString *key = @"testUpdateContactFlowModuleContent"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] updateContactFlowModuleContent:[AWSConnectUpdateContactFlowModuleContentRequest new] completionHandler:^(AWSConnectUpdateContactFlowModuleContentResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateContactFlowModuleMetadata { NSString *key = @"testUpdateContactFlowModuleMetadata"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] updateContactFlowModuleMetadata:[AWSConnectUpdateContactFlowModuleMetadataRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateContactFlowModuleMetadataCompletionHandler { NSString *key = @"testUpdateContactFlowModuleMetadata"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] updateContactFlowModuleMetadata:[AWSConnectUpdateContactFlowModuleMetadataRequest new] completionHandler:^(AWSConnectUpdateContactFlowModuleMetadataResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateContactFlowName { NSString *key = @"testUpdateContactFlowName"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] updateContactFlowName:[AWSConnectUpdateContactFlowNameRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateContactFlowNameCompletionHandler { NSString *key = @"testUpdateContactFlowName"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] updateContactFlowName:[AWSConnectUpdateContactFlowNameRequest new] completionHandler:^(AWSConnectUpdateContactFlowNameResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateContactSchedule { NSString *key = @"testUpdateContactSchedule"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] updateContactSchedule:[AWSConnectUpdateContactScheduleRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateContactScheduleCompletionHandler { NSString *key = @"testUpdateContactSchedule"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] updateContactSchedule:[AWSConnectUpdateContactScheduleRequest new] completionHandler:^(AWSConnectUpdateContactScheduleResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateEvaluationForm { NSString *key = @"testUpdateEvaluationForm"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] updateEvaluationForm:[AWSConnectUpdateEvaluationFormRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateEvaluationFormCompletionHandler { NSString *key = @"testUpdateEvaluationForm"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] updateEvaluationForm:[AWSConnectUpdateEvaluationFormRequest new] completionHandler:^(AWSConnectUpdateEvaluationFormResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateHoursOfOperation { NSString *key = @"testUpdateHoursOfOperation"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] updateHoursOfOperation:[AWSConnectUpdateHoursOfOperationRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateHoursOfOperationCompletionHandler { NSString *key = @"testUpdateHoursOfOperation"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] updateHoursOfOperation:[AWSConnectUpdateHoursOfOperationRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateInstanceAttribute { NSString *key = @"testUpdateInstanceAttribute"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] updateInstanceAttribute:[AWSConnectUpdateInstanceAttributeRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateInstanceAttributeCompletionHandler { NSString *key = @"testUpdateInstanceAttribute"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] updateInstanceAttribute:[AWSConnectUpdateInstanceAttributeRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateInstanceStorageConfig { NSString *key = @"testUpdateInstanceStorageConfig"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] updateInstanceStorageConfig:[AWSConnectUpdateInstanceStorageConfigRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateInstanceStorageConfigCompletionHandler { NSString *key = @"testUpdateInstanceStorageConfig"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] updateInstanceStorageConfig:[AWSConnectUpdateInstanceStorageConfigRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateParticipantRoleConfig { NSString *key = @"testUpdateParticipantRoleConfig"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] updateParticipantRoleConfig:[AWSConnectUpdateParticipantRoleConfigRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateParticipantRoleConfigCompletionHandler { NSString *key = @"testUpdateParticipantRoleConfig"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] updateParticipantRoleConfig:[AWSConnectUpdateParticipantRoleConfigRequest new] completionHandler:^(AWSConnectUpdateParticipantRoleConfigResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdatePhoneNumber { NSString *key = @"testUpdatePhoneNumber"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] updatePhoneNumber:[AWSConnectUpdatePhoneNumberRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdatePhoneNumberCompletionHandler { NSString *key = @"testUpdatePhoneNumber"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] updatePhoneNumber:[AWSConnectUpdatePhoneNumberRequest new] completionHandler:^(AWSConnectUpdatePhoneNumberResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdatePrompt { NSString *key = @"testUpdatePrompt"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] updatePrompt:[AWSConnectUpdatePromptRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdatePromptCompletionHandler { NSString *key = @"testUpdatePrompt"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] updatePrompt:[AWSConnectUpdatePromptRequest new] completionHandler:^(AWSConnectUpdatePromptResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateQueueHoursOfOperation { NSString *key = @"testUpdateQueueHoursOfOperation"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] updateQueueHoursOfOperation:[AWSConnectUpdateQueueHoursOfOperationRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateQueueHoursOfOperationCompletionHandler { NSString *key = @"testUpdateQueueHoursOfOperation"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] updateQueueHoursOfOperation:[AWSConnectUpdateQueueHoursOfOperationRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateQueueMaxContacts { NSString *key = @"testUpdateQueueMaxContacts"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] updateQueueMaxContacts:[AWSConnectUpdateQueueMaxContactsRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateQueueMaxContactsCompletionHandler { NSString *key = @"testUpdateQueueMaxContacts"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] updateQueueMaxContacts:[AWSConnectUpdateQueueMaxContactsRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateQueueName { NSString *key = @"testUpdateQueueName"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] updateQueueName:[AWSConnectUpdateQueueNameRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateQueueNameCompletionHandler { NSString *key = @"testUpdateQueueName"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] updateQueueName:[AWSConnectUpdateQueueNameRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateQueueOutboundCallerConfig { NSString *key = @"testUpdateQueueOutboundCallerConfig"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] updateQueueOutboundCallerConfig:[AWSConnectUpdateQueueOutboundCallerConfigRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateQueueOutboundCallerConfigCompletionHandler { NSString *key = @"testUpdateQueueOutboundCallerConfig"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] updateQueueOutboundCallerConfig:[AWSConnectUpdateQueueOutboundCallerConfigRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateQueueStatus { NSString *key = @"testUpdateQueueStatus"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] updateQueueStatus:[AWSConnectUpdateQueueStatusRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateQueueStatusCompletionHandler { NSString *key = @"testUpdateQueueStatus"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] updateQueueStatus:[AWSConnectUpdateQueueStatusRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateQuickConnectConfig { NSString *key = @"testUpdateQuickConnectConfig"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] updateQuickConnectConfig:[AWSConnectUpdateQuickConnectConfigRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateQuickConnectConfigCompletionHandler { NSString *key = @"testUpdateQuickConnectConfig"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] updateQuickConnectConfig:[AWSConnectUpdateQuickConnectConfigRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateQuickConnectName { NSString *key = @"testUpdateQuickConnectName"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] updateQuickConnectName:[AWSConnectUpdateQuickConnectNameRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateQuickConnectNameCompletionHandler { NSString *key = @"testUpdateQuickConnectName"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] updateQuickConnectName:[AWSConnectUpdateQuickConnectNameRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateRoutingProfileConcurrency { NSString *key = @"testUpdateRoutingProfileConcurrency"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] updateRoutingProfileConcurrency:[AWSConnectUpdateRoutingProfileConcurrencyRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateRoutingProfileConcurrencyCompletionHandler { NSString *key = @"testUpdateRoutingProfileConcurrency"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] updateRoutingProfileConcurrency:[AWSConnectUpdateRoutingProfileConcurrencyRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateRoutingProfileDefaultOutboundQueue { NSString *key = @"testUpdateRoutingProfileDefaultOutboundQueue"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] updateRoutingProfileDefaultOutboundQueue:[AWSConnectUpdateRoutingProfileDefaultOutboundQueueRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateRoutingProfileDefaultOutboundQueueCompletionHandler { NSString *key = @"testUpdateRoutingProfileDefaultOutboundQueue"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] updateRoutingProfileDefaultOutboundQueue:[AWSConnectUpdateRoutingProfileDefaultOutboundQueueRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateRoutingProfileName { NSString *key = @"testUpdateRoutingProfileName"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] updateRoutingProfileName:[AWSConnectUpdateRoutingProfileNameRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateRoutingProfileNameCompletionHandler { NSString *key = @"testUpdateRoutingProfileName"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] updateRoutingProfileName:[AWSConnectUpdateRoutingProfileNameRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateRoutingProfileQueues { NSString *key = @"testUpdateRoutingProfileQueues"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] updateRoutingProfileQueues:[AWSConnectUpdateRoutingProfileQueuesRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateRoutingProfileQueuesCompletionHandler { NSString *key = @"testUpdateRoutingProfileQueues"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] updateRoutingProfileQueues:[AWSConnectUpdateRoutingProfileQueuesRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateRule { NSString *key = @"testUpdateRule"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] updateRule:[AWSConnectUpdateRuleRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateRuleCompletionHandler { NSString *key = @"testUpdateRule"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] updateRule:[AWSConnectUpdateRuleRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateSecurityProfile { NSString *key = @"testUpdateSecurityProfile"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] updateSecurityProfile:[AWSConnectUpdateSecurityProfileRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateSecurityProfileCompletionHandler { NSString *key = @"testUpdateSecurityProfile"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] updateSecurityProfile:[AWSConnectUpdateSecurityProfileRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateTaskTemplate { NSString *key = @"testUpdateTaskTemplate"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] updateTaskTemplate:[AWSConnectUpdateTaskTemplateRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateTaskTemplateCompletionHandler { NSString *key = @"testUpdateTaskTemplate"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] updateTaskTemplate:[AWSConnectUpdateTaskTemplateRequest new] completionHandler:^(AWSConnectUpdateTaskTemplateResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateTrafficDistribution { NSString *key = @"testUpdateTrafficDistribution"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] updateTrafficDistribution:[AWSConnectUpdateTrafficDistributionRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateTrafficDistributionCompletionHandler { NSString *key = @"testUpdateTrafficDistribution"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] updateTrafficDistribution:[AWSConnectUpdateTrafficDistributionRequest new] completionHandler:^(AWSConnectUpdateTrafficDistributionResponse* _Nullable response, NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); XCTAssertNil(response); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateUserHierarchy { NSString *key = @"testUpdateUserHierarchy"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] updateUserHierarchy:[AWSConnectUpdateUserHierarchyRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateUserHierarchyCompletionHandler { NSString *key = @"testUpdateUserHierarchy"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] updateUserHierarchy:[AWSConnectUpdateUserHierarchyRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateUserHierarchyGroupName { NSString *key = @"testUpdateUserHierarchyGroupName"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] updateUserHierarchyGroupName:[AWSConnectUpdateUserHierarchyGroupNameRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateUserHierarchyGroupNameCompletionHandler { NSString *key = @"testUpdateUserHierarchyGroupName"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] updateUserHierarchyGroupName:[AWSConnectUpdateUserHierarchyGroupNameRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateUserHierarchyStructure { NSString *key = @"testUpdateUserHierarchyStructure"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] updateUserHierarchyStructure:[AWSConnectUpdateUserHierarchyStructureRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateUserHierarchyStructureCompletionHandler { NSString *key = @"testUpdateUserHierarchyStructure"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] updateUserHierarchyStructure:[AWSConnectUpdateUserHierarchyStructureRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateUserIdentityInfo { NSString *key = @"testUpdateUserIdentityInfo"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] updateUserIdentityInfo:[AWSConnectUpdateUserIdentityInfoRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateUserIdentityInfoCompletionHandler { NSString *key = @"testUpdateUserIdentityInfo"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] updateUserIdentityInfo:[AWSConnectUpdateUserIdentityInfoRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateUserPhoneConfig { NSString *key = @"testUpdateUserPhoneConfig"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] updateUserPhoneConfig:[AWSConnectUpdateUserPhoneConfigRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateUserPhoneConfigCompletionHandler { NSString *key = @"testUpdateUserPhoneConfig"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] updateUserPhoneConfig:[AWSConnectUpdateUserPhoneConfigRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateUserRoutingProfile { NSString *key = @"testUpdateUserRoutingProfile"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] updateUserRoutingProfile:[AWSConnectUpdateUserRoutingProfileRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateUserRoutingProfileCompletionHandler { NSString *key = @"testUpdateUserRoutingProfile"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] updateUserRoutingProfile:[AWSConnectUpdateUserRoutingProfileRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateUserSecurityProfiles { NSString *key = @"testUpdateUserSecurityProfiles"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; [[[[AWSConnect ConnectForKey:key] updateUserSecurityProfiles:[AWSConnectUpdateUserSecurityProfilesRequest new]] continueWithBlock:^id(AWSTask *task) { XCTAssertNotNil(task.error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", task.error.domain); XCTAssertEqual(8848, task.error.code); XCTAssertNil(task.result); return nil; }] waitUntilFinished]; OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } - (void)testUpdateUserSecurityProfilesCompletionHandler { NSString *key = @"testUpdateUserSecurityProfiles"; AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 credentialsProvider:nil]; [AWSConnect registerConnectWithConfiguration:configuration forKey:key]; AWSConnect *awsClient = [AWSConnect ConnectForKey:key]; XCTAssertNotNil(awsClient); XCTAssertNotNil(mockNetworking); [awsClient setValue:mockNetworking forKey:@"networking"]; dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); [[AWSConnect ConnectForKey:key] updateUserSecurityProfiles:[AWSConnectUpdateUserSecurityProfilesRequest new] completionHandler:^(NSError * _Nullable error) { XCTAssertNotNil(error); XCTAssertEqualObjects(@"OCMockExpectedNetworkingError", error.domain); XCTAssertEqual(8848, error.code); dispatch_semaphore_signal(semaphore); }]; dispatch_semaphore_wait(semaphore, dispatch_time(DISPATCH_TIME_NOW, (int)(2.0 * NSEC_PER_SEC))); OCMVerify([mockNetworking sendRequest:[OCMArg isNotNil]]); [AWSConnect removeConnectForKey:key]; } @end