@@ -139,7 +139,7 @@ final class GATTTests: XCTestCase {
139139 Ending Handle: 0xffff
140140 Attribute Group Type: 2800 (GATT Primary Service Declaration)
141141 */
142- ( ATTReadByGroupTypeRequest ( startHandle: 0x0001 , endHandle: 0xffff , type: . primaryService) ,
142+ ( ATTReadByGroupTypeRequest ( startHandle: 0x0001 , endHandle: 0xffff , type: BluetoothUUID . Declaration . primaryService) ,
143143 [ 0x10 , 0x01 , 0x00 , 0xFF , 0xFF , 0x00 , 0x28 ] ) ,
144144 /**
145145 Read By Group Type Response
@@ -150,7 +150,7 @@ final class GATTTests: XCTestCase {
150150 ( ATTReadByGroupTypeResponse ( attributeData: [
151151 ATTReadByGroupTypeResponse . AttributeData ( attributeHandle: 0x001 ,
152152 endGroupHandle: 0x0004 ,
153- value: Data ( BluetoothUUID . batteryService . littleEndian) )
153+ value: Data ( BluetoothUUID . Service . battery . littleEndian) )
154154 ] ) !,
155155 [ 0x11 , 0x06 , 0x01 , 0x00 , 0x04 , 0x00 , 0x0F , 0x18 ] ) ,
156156 /**
@@ -160,7 +160,7 @@ final class GATTTests: XCTestCase {
160160 Ending Handle: 0xffff
161161 Attribute Group Type: 2800 (GATT Primary Service Declaration)
162162 */
163- ( ATTReadByGroupTypeRequest ( startHandle: 0x0005 , endHandle: 0xffff , type: . primaryService) ,
163+ ( ATTReadByGroupTypeRequest ( startHandle: 0x0005 , endHandle: 0xffff , type: BluetoothUUID . Declaration . primaryService) ,
164164 [ 0x10 , 0x05 , 0x00 , 0xFF , 0xFF , 0x00 , 0x28 ] ) ,
165165 /**
166166 Error Response - Attribute Handle: 0x0005 - Error Code: 0x0A - Attribute Not Found
@@ -190,7 +190,7 @@ final class GATTTests: XCTestCase {
190190 ]
191191
192192 let service = GATTAttribute< Data> . Service(
193- uuid: . batteryService ,
193+ uuid: BluetoothUUID . Service . battery ,
194194 isPrimary: true ,
195195 characteristics: characteristics
196196 )
@@ -211,7 +211,7 @@ final class GATTTests: XCTestCase {
211211 guard let foundService = services. first,
212212 services. count == 1
213213 else { XCTFail ( ) ; return }
214- XCTAssertEqual ( foundService. uuid, . batteryService )
214+ XCTAssertEqual ( foundService. uuid, BluetoothUUID . Service . battery )
215215 XCTAssertEqual ( foundService. isPrimary, true )
216216 let clientCache = await central. storage. connections. values. first? . connection. client. connection. socket. cache
217217 XCTAssertEqual ( clientCache, mockData. client)
@@ -245,7 +245,7 @@ final class GATTTests: XCTestCase {
245245 ]
246246
247247 let service = GATTAttribute< Data> . Service(
248- uuid: . batteryService ,
248+ uuid: BluetoothUUID . Service . battery ,
249249 isPrimary: true ,
250250 characteristics: characteristics
251251 )
@@ -266,13 +266,13 @@ final class GATTTests: XCTestCase {
266266 let currentValue = await peripheralDatabaseValue ( )
267267 XCTAssertEqual ( currentValue, characteristics [ 0 ] . value)
268268 peripheral. willWrite = {
269- XCTAssertEqual ( $0. uuid, . batteryLevel)
269+ XCTAssertEqual ( $0. uuid, BluetoothUUID . Characteristic . batteryLevel)
270270 XCTAssertEqual ( $0. value, batteryLevel. data)
271271 XCTAssertEqual ( $0. newValue, newValue. data)
272272 return nil
273273 }
274274 peripheral. didWrite = {
275- XCTAssertEqual ( $0. uuid, . batteryLevel)
275+ XCTAssertEqual ( $0. uuid, BluetoothUUID . Characteristic . batteryLevel)
276276 XCTAssertEqual ( $0. value, newValue. data)
277277 }
278278 } ,
@@ -283,13 +283,13 @@ final class GATTTests: XCTestCase {
283283 guard let foundService = services. first,
284284 services. count == 1
285285 else { XCTFail ( ) ; return }
286- XCTAssertEqual ( foundService. uuid, . batteryService )
286+ XCTAssertEqual ( foundService. uuid, BluetoothUUID . Service . battery )
287287 XCTAssertEqual ( foundService. isPrimary, true )
288288 let foundCharacteristics = try await central. discoverCharacteristics ( for: foundService)
289289 guard let foundCharacteristic = foundCharacteristics. first,
290290 foundCharacteristics. count == 1
291291 else { XCTFail ( ) ; return }
292- XCTAssertEqual ( foundCharacteristic. uuid, . batteryLevel)
292+ XCTAssertEqual ( foundCharacteristic. uuid, BluetoothUUID . Characteristic . batteryLevel)
293293 XCTAssertEqual ( foundCharacteristic. properties, [ . read, . write] )
294294 // read value
295295 let characteristicData = try await central. readValue ( for: foundCharacteristic)
@@ -323,7 +323,7 @@ final class GATTTests: XCTestCase {
323323 ]
324324
325325 let service = GATTAttribute< Data> . Service(
326- uuid: . batteryService ,
326+ uuid: BluetoothUUID . Service . battery ,
327327 isPrimary: true ,
328328 characteristics: characteristics
329329 )
@@ -349,13 +349,13 @@ final class GATTTests: XCTestCase {
349349 guard let foundService = services. first,
350350 services. count == 1
351351 else { XCTFail ( ) ; return }
352- XCTAssertEqual ( foundService. uuid, . batteryService )
352+ XCTAssertEqual ( foundService. uuid, BluetoothUUID . Service . battery )
353353 XCTAssertEqual ( foundService. isPrimary, true )
354354 let foundCharacteristics = try await central. discoverCharacteristics ( for: foundService)
355355 guard let foundCharacteristic = foundCharacteristics. first,
356356 foundCharacteristics. count == 1
357357 else { XCTFail ( ) ; return }
358- XCTAssertEqual ( foundCharacteristic. uuid, . batteryLevel)
358+ XCTAssertEqual ( foundCharacteristic. uuid, BluetoothUUID . Characteristic . batteryLevel)
359359 XCTAssertEqual ( foundCharacteristic. properties, [ . read, . notify] )
360360 // wait for notifications
361361 let stream = central. notify ( for: foundCharacteristic)
@@ -388,7 +388,7 @@ final class GATTTests: XCTestCase {
388388 ]
389389
390390 let service = GATTAttribute< Data> . Service(
391- uuid: . batteryService ,
391+ uuid: BluetoothUUID . Service . battery ,
392392 isPrimary: true ,
393393 characteristics: characteristics
394394 )
@@ -414,13 +414,13 @@ final class GATTTests: XCTestCase {
414414 guard let foundService = services. first,
415415 services. count == 1
416416 else { XCTFail ( ) ; return }
417- XCTAssertEqual ( foundService. uuid, . batteryService )
417+ XCTAssertEqual ( foundService. uuid, BluetoothUUID . Service . battery )
418418 XCTAssertEqual ( foundService. isPrimary, true )
419419 let foundCharacteristics = try await central. discoverCharacteristics ( for: foundService)
420420 guard let foundCharacteristic = foundCharacteristics. first,
421421 foundCharacteristics. count == 1
422422 else { XCTFail ( ) ; return }
423- XCTAssertEqual ( foundCharacteristic. uuid, . batteryLevel)
423+ XCTAssertEqual ( foundCharacteristic. uuid, BluetoothUUID . Characteristic . batteryLevel)
424424 XCTAssertEqual ( foundCharacteristic. properties, [ . read, . indicate] )
425425 // wait for notifications
426426 let stream = central. notify ( for: foundCharacteristic)
@@ -445,10 +445,10 @@ final class GATTTests: XCTestCase {
445445 GATTAttribute< Data> . Descriptor( uuid: BluetoothUUID ( ) ,
446446 value: Data ( " UInt128 Descriptor " . utf8) ,
447447 permissions: [ . read, . write] ) ,
448- GATTAttribute< Data> . Descriptor( uuid: . savantSystems,
448+ GATTAttribute< Data> . Descriptor( uuid: BluetoothUUID . Member . savantSystems,
449449 value: Data ( " Savant " . utf8) ,
450450 permissions: [ . read] ) ,
451- GATTAttribute< Data> . Descriptor( uuid: . savantSystems2,
451+ GATTAttribute< Data> . Descriptor( uuid: BluetoothUUID . Member . savantSystems2,
452452 value: Data ( " Savant2 " . utf8) ,
453453 permissions: [ . write] )
454454 ]
0 commit comments