()
| 619 | |
| 620 | #[test] |
| 621 | fn test_registry_require_not_found() { |
| 622 | let mut registry = AgentRegistry::new(); |
| 623 | registry.register(Box::new(MockAgent::new("alpha"))); |
| 624 | let err = registry.require("beta").unwrap_err(); |
| 625 | match err { |
| 626 | AgentError::AgentNotFound { name, available } => { |
| 627 | assert_eq!(name, "beta"); |
| 628 | assert!(available.contains("alpha")); |
| 629 | } |
| 630 | other => panic!("Expected AgentNotFound, got: {:?}", other), |
| 631 | } |
| 632 | } |
| 633 | |
| 634 | #[test] |
| 635 | fn test_registry_register_replaces_duplicate() { |