()
| 34 | } |
| 35 | |
| 36 | pub async fn test_discover_services() { |
| 37 | let peripheral = peripheral_finder::find_and_connect().await; |
| 38 | let services = peripheral.services(); |
| 39 | let service_uuids: Vec<_> = services.iter().map(|s| s.uuid).collect(); |
| 40 | assert!( |
| 41 | service_uuids.contains(&gatt_uuids::CONTROL_SERVICE), |
| 42 | "Control Service not found in {:?}", |
| 43 | service_uuids |
| 44 | ); |
| 45 | assert!( |
| 46 | service_uuids.contains(&gatt_uuids::READ_WRITE_SERVICE), |
| 47 | "Read/Write Service not found" |
| 48 | ); |
| 49 | assert!( |
| 50 | service_uuids.contains(&gatt_uuids::NOTIFICATION_SERVICE), |
| 51 | "Notification Service not found" |
| 52 | ); |
| 53 | assert!( |
| 54 | service_uuids.contains(&gatt_uuids::DESCRIPTOR_SERVICE), |
| 55 | "Descriptor Service not found" |
| 56 | ); |
| 57 | peripheral.disconnect().await.unwrap(); |
| 58 | } |
| 59 | |
| 60 | pub async fn test_discover_characteristics() { |
| 61 | let peripheral = peripheral_finder::find_and_connect().await; |
nothing calls this directly
no test coverage detected