()
| 648 | |
| 649 | #[test] |
| 650 | fn test_registry_require_not_found() { |
| 651 | let mut registry = AgentRegistry::new(); |
| 652 | registry.register(Box::new(MockAgent::new("alpha"))); |
| 653 | let err = registry.require("beta").unwrap_err(); |
| 654 | match err { |
| 655 | AgentError::AgentNotFound { name, available } => { |
| 656 | assert_eq!(name, "beta"); |
| 657 | assert!(available.contains("alpha")); |
| 658 | } |
| 659 | other => panic!("Expected AgentNotFound, got: {:?}", other), |
| 660 | } |
| 661 | } |
| 662 | |
| 663 | #[test] |
| 664 | fn test_registry_register_replaces_duplicate() { |