@@ -14,23 +14,23 @@ class IMClientTestCase: RTMBaseTestCase {
1414 func testInit( ) {
1515 do {
1616 let invalidID : String = Array < String > . init ( repeating: " a " , count: 65 ) . joined ( )
17- let _ = try IMClient ( ID: invalidID)
17+ let _ = try IMClient ( ID: invalidID, options : [ ] )
1818 XCTFail ( )
1919 } catch {
2020 XCTAssertTrue ( error is LCError )
2121 }
2222
2323 do {
2424 let invalidTag : String = " default "
25- let _ = try IMClient ( ID: " aaaaaa " , tag: invalidTag)
25+ let _ = try IMClient ( ID: uuid , tag: invalidTag, options : [ ] )
2626 XCTFail ( )
2727 } catch {
2828 XCTAssertTrue ( error is LCError )
2929 }
3030
3131 do {
32- let _ = try IMClient ( ID: uuid)
33- let _ = try IMClient ( ID: uuid, tag: uuid)
32+ let _ = try IMClient ( ID: uuid, options : [ ] )
33+ let _ = try IMClient ( ID: uuid, tag: uuid, options : [ ] )
3434 } catch {
3535 XCTFail ( " \( error) " )
3636 }
@@ -44,7 +44,7 @@ class IMClientTestCase: RTMBaseTestCase {
4444 XCTAssertTrue ( user. signUp ( ) . isSuccess)
4545
4646 do {
47- let client = try IMClient ( user: user)
47+ let client = try IMClient ( user: user, options : [ ] )
4848 XCTAssertNotNil ( client. user)
4949 XCTAssertEqual ( client. ID, user. objectId? . stringValue)
5050 } catch {
@@ -53,15 +53,15 @@ class IMClientTestCase: RTMBaseTestCase {
5353 }
5454
5555 func testDeinit( ) {
56- var client : IMClient ? = try ! IMClient ( ID: uuid, tag: uuid)
56+ var client : IMClient ? = try ! IMClient ( ID: uuid, tag: uuid, options : [ ] )
5757 weak var wClient : IMClient ? = client
5858 client = nil
5959 delay ( )
6060 XCTAssertNil ( wClient)
6161 }
6262
6363 func testOpenAndClose( ) {
64- let client : IMClient = try ! IMClient ( ID: uuid)
64+ let client : IMClient = try ! IMClient ( ID: uuid, options : [ ] )
6565
6666 expecting { ( exp) in
6767 client. open ( completion: { ( result) in
@@ -111,7 +111,7 @@ class IMClientTestCase: RTMBaseTestCase {
111111
112112 if let objectID = user. objectId? . value, let sessionToken = user. sessionToken? . value {
113113
114- var clientWithUser : IMClient ! = try ! IMClient ( user: user)
114+ var clientWithUser : IMClient ! = try ! IMClient ( user: user, options : [ ] )
115115 expecting { ( exp) in
116116 clientWithUser. open ( completion: { ( result) in
117117 XCTAssertTrue ( result. isSuccess)
@@ -125,7 +125,7 @@ class IMClientTestCase: RTMBaseTestCase {
125125
126126 let signatureDelegator = SignatureDelegator ( )
127127 signatureDelegator. sessionToken = sessionToken
128- let clientWithID = try ! IMClient ( ID: objectID, signatureDelegate: signatureDelegator)
128+ let clientWithID = try ! IMClient ( ID: objectID, options : [ ] , signatureDelegate: signatureDelegator)
129129 expecting { ( exp) in
130130 clientWithID. open ( completion: { ( result) in
131131 XCTAssertTrue ( result. isSuccess)
@@ -137,7 +137,7 @@ class IMClientTestCase: RTMBaseTestCase {
137137 }
138138
139139 func testDelegateEvent( ) {
140- let client : IMClient = try ! IMClient ( ID: uuid)
140+ let client : IMClient = try ! IMClient ( ID: uuid, options : [ ] )
141141 let delegator : Delegator = Delegator ( )
142142 client. delegate = delegator
143143
@@ -200,6 +200,7 @@ class IMClientTestCase: RTMBaseTestCase {
200200 let client1 : IMClient = try ! IMClient (
201201 ID: clientID,
202202 tag: tag,
203+ options: [ ] ,
203204 delegate: delegator1)
204205
205206 expecting { ( exp) in
@@ -223,6 +224,7 @@ class IMClientTestCase: RTMBaseTestCase {
223224 let client2 : IMClient = try ! IMClient (
224225 ID: clientID,
225226 tag: tag,
227+ options: [ ] ,
226228 delegate: delegator2)
227229
228230 expecting (
@@ -276,7 +278,7 @@ class IMClientTestCase: RTMBaseTestCase {
276278 }
277279
278280 func testSessionTokenExpired( ) {
279- let client : IMClient = try ! IMClient ( ID: uuid)
281+ let client : IMClient = try ! IMClient ( ID: uuid, options : [ ] )
280282 let delegator : Delegator = Delegator ( )
281283 client. delegate = delegator
282284
@@ -326,7 +328,7 @@ class IMClientTestCase: RTMBaseTestCase {
326328 func testReportDeviceToken( ) {
327329 let application = LCApplication . default
328330 let currentDeviceToken = application. currentInstallation. deviceToken? . value
329- let client : IMClient = try ! IMClient ( application: application, ID: uuid)
331+ let client : IMClient = try ! IMClient ( application: application, ID: uuid, options : [ ] )
330332 delay ( )
331333 XCTAssertEqual ( currentDeviceToken, client. currentDeviceToken)
332334
@@ -349,8 +351,8 @@ class IMClientTestCase: RTMBaseTestCase {
349351 }
350352
351353 func testSessionQuery( ) {
352- let client1 : IMClient = try ! IMClient ( ID: uuid)
353- let client2 : IMClient = try ! IMClient ( ID: uuid)
354+ let client1 : IMClient = try ! IMClient ( ID: uuid, options : [ ] )
355+ let client2 : IMClient = try ! IMClient ( ID: uuid, options : [ ] )
354356
355357 let openExp1 = expectation ( description: " open " )
356358 client1. open { ( result) in
0 commit comments