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