@@ -17,6 +17,12 @@ class AppSyncRealTimeClientFactoryTests: XCTestCase {
1717 AppSyncRealTimeClientFactory . appSyncRealTimeEndpoint ( appSyncEndpoint) ,
1818 URL ( string: " wss://abc.appsync-realtime-api.amazonaws.com/graphql " )
1919 )
20+
21+ let appSyncEndpointCN = URL ( string: " https://abc.appsync-api.amazonaws.com.cn/graphql " ) !
22+ XCTAssertEqual (
23+ AppSyncRealTimeClientFactory . appSyncRealTimeEndpoint ( appSyncEndpointCN) ,
24+ URL ( string: " wss://abc.appsync-realtime-api.amazonaws.com.cn/graphql " )
25+ )
2026 }
2127
2228 func testAppSyncRealTimeEndpoint_withAWSAppSyncRealTimeDomain_returnTheSameDomain( ) {
@@ -25,6 +31,12 @@ class AppSyncRealTimeClientFactoryTests: XCTestCase {
2531 AppSyncRealTimeClientFactory . appSyncRealTimeEndpoint ( appSyncEndpoint) ,
2632 URL ( string: " wss://abc.appsync-realtime-api.amazonaws.com/graphql " )
2733 )
34+
35+ let appSyncEndpointCN = URL ( string: " wss://abc.appsync-realtime-api.amazonaws.com.cn/graphql " ) !
36+ XCTAssertEqual (
37+ AppSyncRealTimeClientFactory . appSyncRealTimeEndpoint ( appSyncEndpointCN) ,
38+ URL ( string: " wss://abc.appsync-realtime-api.amazonaws.com.cn/graphql " )
39+ )
2840 }
2941
3042 func testAppSyncRealTimeEndpoint_withCustomDomain_returnCorrectRealtimePath( ) {
@@ -33,6 +45,12 @@ class AppSyncRealTimeClientFactoryTests: XCTestCase {
3345 AppSyncRealTimeClientFactory . appSyncRealTimeEndpoint ( appSyncEndpoint) ,
3446 URL ( string: " https://test.example.com/graphql/realtime " )
3547 )
48+
49+ let appSyncEndpointCN = URL ( string: " https://test.example.com.cn/graphql " ) !
50+ XCTAssertEqual (
51+ AppSyncRealTimeClientFactory . appSyncRealTimeEndpoint ( appSyncEndpointCN) ,
52+ URL ( string: " https://test.example.com.cn/graphql/realtime " )
53+ )
3654 }
3755
3856 func testAppSyncApiEndpoint_withAWSAppSyncRealTimeDomain_returnCorrectApiDomain( ) {
@@ -41,6 +59,12 @@ class AppSyncRealTimeClientFactoryTests: XCTestCase {
4159 AppSyncRealTimeClientFactory . appSyncApiEndpoint ( appSyncEndpoint) ,
4260 URL ( string: " https://abc.appsync-api.amazonaws.com/graphql " )
4361 )
62+
63+ let appSyncEndpointCN = URL ( string: " wss://abc.appsync-realtime-api.amazonaws.com.cn/graphql " ) !
64+ XCTAssertEqual (
65+ AppSyncRealTimeClientFactory . appSyncApiEndpoint ( appSyncEndpointCN) ,
66+ URL ( string: " https://abc.appsync-api.amazonaws.com.cn/graphql " )
67+ )
4468 }
4569
4670 func testAppSyncApiEndpoint_withAWSAppSyncApiDomain_returnTheSameDomain( ) {
@@ -49,6 +73,12 @@ class AppSyncRealTimeClientFactoryTests: XCTestCase {
4973 AppSyncRealTimeClientFactory . appSyncApiEndpoint ( appSyncEndpoint) ,
5074 URL ( string: " https://abc.appsync-api.amazonaws.com/graphql " )
5175 )
76+
77+ let appSyncEndpointCN = URL ( string: " https://abc.appsync-api.amazonaws.com.cn/graphql " ) !
78+ XCTAssertEqual (
79+ AppSyncRealTimeClientFactory . appSyncApiEndpoint ( appSyncEndpointCN) ,
80+ URL ( string: " https://abc.appsync-api.amazonaws.com.cn/graphql " )
81+ )
5282 }
5383
5484 func testAppSyncApiEndpoint_withCustomDomain_returnCorrectRealtimePath( ) {
@@ -57,5 +87,11 @@ class AppSyncRealTimeClientFactoryTests: XCTestCase {
5787 AppSyncRealTimeClientFactory . appSyncApiEndpoint ( appSyncEndpoint) ,
5888 URL ( string: " https://test.example.com/graphql " )
5989 )
90+
91+ let appSyncEndpointCN = URL ( string: " https://test.example.com.cn/graphql " ) !
92+ XCTAssertEqual (
93+ AppSyncRealTimeClientFactory . appSyncApiEndpoint ( appSyncEndpointCN) ,
94+ URL ( string: " https://test.example.com.cn/graphql " )
95+ )
6096 }
6197}
0 commit comments