()
| 680 | |
| 681 | #[test] |
| 682 | fn test_registry_require_not_found() { |
| 683 | let mut registry = AgentRegistry::new(); |
| 684 | registry.register(Box::new(MockAgent::new("alpha"))); |
| 685 | let err = registry.require("beta").unwrap_err(); |
| 686 | match err { |
| 687 | AgentError::AgentNotFound { name, available } => { |
| 688 | assert_eq!(name, "beta"); |
| 689 | assert!(available.contains("alpha")); |
| 690 | } |
| 691 | other => panic!("Expected AgentNotFound, got: {:?}", other), |
| 692 | } |
| 693 | } |
| 694 | |
| 695 | #[test] |
| 696 | fn test_registry_register_replaces_duplicate() { |