(dev_eui: EUI64, items: Vec<device_queue::DeviceQueueItem>)
| 357 | } |
| 358 | |
| 359 | pub fn device_queue_items(dev_eui: EUI64, items: Vec<device_queue::DeviceQueueItem>) -> Validator { |
| 360 | Box::new(move || { |
| 361 | let items = items.clone(); |
| 362 | let dev_eui = dev_eui; |
| 363 | Box::pin(async move { |
| 364 | let items_get = device_queue::get_for_dev_eui(&dev_eui).await.unwrap(); |
| 365 | |
| 366 | let items: Vec<device_queue::DeviceQueueItem> = items |
| 367 | .iter() |
| 368 | .map(|item| device_queue::DeviceQueueItem { |
| 369 | f_port: item.f_port, |
| 370 | confirmed: item.confirmed, |
| 371 | data: item.data.clone(), |
| 372 | is_pending: item.is_pending, |
| 373 | ..Default::default() |
| 374 | }) |
| 375 | .collect(); |
| 376 | |
| 377 | let items_get: Vec<device_queue::DeviceQueueItem> = items_get |
| 378 | .iter() |
| 379 | .map(|item| device_queue::DeviceQueueItem { |
| 380 | f_port: item.f_port, |
| 381 | confirmed: item.confirmed, |
| 382 | data: item.data.clone(), |
| 383 | is_pending: item.is_pending, |
| 384 | ..Default::default() |
| 385 | }) |
| 386 | .collect(); |
| 387 | |
| 388 | assert_eq!(items, items_get); |
| 389 | }) |
| 390 | }) |
| 391 | } |
| 392 | |
| 393 | pub fn enabled_class(dev_eui: EUI64, c: DeviceClass) -> Validator { |
| 394 | Box::new(move || { |
nothing calls this directly
no test coverage detected