()
| 469 | |
| 470 | #[test] |
| 471 | fn test_context_query_builder() { |
| 472 | let query = ContextQuery::new("test") |
| 473 | .with_types([ContextType::Memory, ContextType::Skill]) |
| 474 | .with_depth(ContextDepth::Full) |
| 475 | .with_max_results(5) |
| 476 | .with_max_tokens(2000) |
| 477 | .with_session_id("sess-123") |
| 478 | .with_param("custom", serde_json::json!("value")); |
| 479 | |
| 480 | assert_eq!(query.context_types.len(), 2); |
| 481 | assert!(query.context_types.contains(&ContextType::Memory)); |
| 482 | assert!(query.context_types.contains(&ContextType::Skill)); |
| 483 | assert_eq!(query.depth, ContextDepth::Full); |
| 484 | assert_eq!(query.max_results, 5); |
| 485 | assert_eq!(query.max_tokens, 2000); |
| 486 | assert_eq!(query.session_id, Some("sess-123".to_string())); |
| 487 | assert_eq!( |
| 488 | query.params.get("custom"), |
| 489 | Some(&serde_json::json!("value")) |
| 490 | ); |
| 491 | } |
| 492 | |
| 493 | #[test] |
| 494 | fn test_context_query_serialization() { |
nothing calls this directly
no test coverage detected