(st: integration_pb::StatusEvent)
| 215 | } |
| 216 | |
| 217 | pub fn status_event(st: integration_pb::StatusEvent) -> Validator { |
| 218 | Box::new(move || { |
| 219 | let st = st.clone(); |
| 220 | Box::pin(async move { |
| 221 | // Integration events are handled async. |
| 222 | sleep(Duration::from_millis(100)).await; |
| 223 | |
| 224 | let mut mock_events = mock::get_status_events().await; |
| 225 | assert_eq!(1, mock_events.len()); |
| 226 | |
| 227 | assert_ne!("", mock_events[0].deduplication_id); |
| 228 | assert_ne!(None, mock_events[0].time); |
| 229 | |
| 230 | mock_events[0].deduplication_id = "".into(); |
| 231 | mock_events[0].time = None; |
| 232 | assert_eq!(st, mock_events[0]); |
| 233 | }) |
| 234 | }) |
| 235 | } |
| 236 | |
| 237 | pub fn device_join_eui(dev_eui: EUI64, join_eui: EUI64) -> Validator { |
| 238 | Box::new(move || { |
no test coverage detected