()
| 594 | |
| 595 | #[test] |
| 596 | fn test_context_item_serialization() { |
| 597 | let item = ContextItem::new("item-3", ContextType::Skill, "Skill instructions") |
| 598 | .with_token_count(200) |
| 599 | .with_relevance(0.9) |
| 600 | .with_source("viking://skills/code-review"); |
| 601 | |
| 602 | let json = serde_json::to_string(&item).unwrap(); |
| 603 | let parsed: ContextItem = serde_json::from_str(&json).unwrap(); |
| 604 | |
| 605 | assert_eq!(parsed.id, "item-3"); |
| 606 | assert_eq!(parsed.context_type, ContextType::Skill); |
| 607 | assert_eq!(parsed.content, "Skill instructions"); |
| 608 | assert_eq!(parsed.token_count, 200); |
| 609 | } |
| 610 | |
| 611 | // ======================================================================== |
| 612 | // ContextResult Tests |
nothing calls this directly
no test coverage detected