()
| 706 | |
| 707 | #[test] |
| 708 | fn test_registry_require_not_found() { |
| 709 | let mut registry = AgentRegistry::new(); |
| 710 | registry.register(Box::new(MockAgent::new("alpha"))); |
| 711 | let err = registry.require("beta").unwrap_err(); |
| 712 | match err { |
| 713 | AgentError::AgentNotFound { name, available } => { |
| 714 | assert_eq!(name, "beta"); |
| 715 | assert!(available.contains("alpha")); |
| 716 | } |
| 717 | other => panic!("Expected AgentNotFound, got: {:?}", other), |
| 718 | } |
| 719 | } |
| 720 | |
| 721 | #[test] |
| 722 | fn test_registry_register_replaces_duplicate() { |