()
| 492 | |
| 493 | #[test] |
| 494 | fn test_context_query_serialization() { |
| 495 | let query = ContextQuery::new("search term") |
| 496 | .with_types([ContextType::Resource]) |
| 497 | .with_session_id("sess-456"); |
| 498 | |
| 499 | let json = serde_json::to_string(&query).unwrap(); |
| 500 | let parsed: ContextQuery = serde_json::from_str(&json).unwrap(); |
| 501 | |
| 502 | assert_eq!(parsed.query, "search term"); |
| 503 | assert_eq!(parsed.session_id, Some("sess-456".to_string())); |
| 504 | } |
| 505 | |
| 506 | #[test] |
| 507 | fn test_context_query_deserialization_with_defaults() { |
nothing calls this directly
no test coverage detected